Re: [PATCH] ALSA: Remove subsystem-specific malloc (1/8)

Arjan van de Ven
2004-06-09T20:21:54Z

[-- Attachment #1: Type: text/plain, Size: 299 bytes --]

> + */
> +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

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]