[FFmpeg-devel] [PATCH 1/3] Replace DUP_DATA & memset with 0 by av_mallocz
nicolas.george at normalesup.org
Mon Sep 17 18:56:58 CEST 2012
Le jour du Génie, an CCXX, Andrey Utkin a écrit :
> Offtop childish question: does malloc(struct_size * number) always alloc
> same size as calloc(number, struct_size)? I.e. is having two params in
> calloc() a nonsense?
No: struct_size * number can overflow and allocate less memory than
intended. calloc with its two arguments checks the overflow and returns an
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 198 bytes
Desc: Digital signature
More information about the ffmpeg-devel