diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2011-04-29 02:13:59 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2011-04-29 02:17:38 +0200 |
commit | 5a36783bc4a1887a67dbfe5ec7198903f35a46b1 (patch) | |
tree | eff96566915132e8ae84b3c4041d04ab65f96b58 /libavutil/mem.c | |
parent | 0fea3b7b807b58b72522044770b9307ba141f172 (diff) | |
download | ffmpeg-5a36783bc4a1887a67dbfe5ec7198903f35a46b1.tar.gz |
Fix all malloc(0) issues
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavutil/mem.c')
-rw-r--r-- | libavutil/mem.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libavutil/mem.c b/libavutil/mem.c index 90f8667505..f0f18d1ce9 100644 --- a/libavutil/mem.c +++ b/libavutil/mem.c @@ -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); |