mirror of
https://github.com/nyanmisaka/ffmpeg-rockchip.git
synced 2026-01-23 23:21:06 +01:00
Fix all malloc(0) issues
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
0fea3b7b80
commit
5a36783bc4
1 changed files with 2 additions and 0 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue