Commit 5a36783b authored by Michael Niedermayer's avatar Michael Niedermayer

Fix all malloc(0) issues

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 0fea3b7b
......@@ -71,6 +71,8 @@ void *av_malloc(size_t size)
/* let's disallow possible ambiguous cases */
if(size > (INT_MAX-32) )
return NULL;
else if(!size)
size= 1;
#if CONFIG_MEMALIGN_HACK
ptr = malloc(size+32);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment