[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)

> + */
> +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    [W:0.093 / U:2.428 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site