lkml.org 
[lkml]   [2004]   [Jun]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] ALSA: Remove subsystem-specific malloc (1/8)
From
Date

> + */
> +void *kcalloc(size_t n, size_t size, int flags)
> +{
> + void *ret = kmalloc(n * size, flags);

how about making sure n*size doesn't overflow an int in this function?
We had a few security holes due to that happening a while ago; might as
well prevent it from happening entirely
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2005-03-22 14:03    [from the cache]
©2003-2011 Jasper Spaans