You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-07-16 22:42:38 +02:00
Fix all malloc(0) issues
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
@ -71,6 +71,8 @@ void *av_malloc(size_t size)
|
|||||||
/* let's disallow possible ambiguous cases */
|
/* let's disallow possible ambiguous cases */
|
||||||
if(size > (INT_MAX-32) )
|
if(size > (INT_MAX-32) )
|
||||||
return NULL;
|
return NULL;
|
||||||
|
else if(!size)
|
||||||
|
size= 1;
|
||||||
|
|
||||||
#if CONFIG_MEMALIGN_HACK
|
#if CONFIG_MEMALIGN_HACK
|
||||||
ptr = malloc(size+32);
|
ptr = malloc(size+32);
|
||||||
|
Reference in New Issue
Block a user