aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-09-06 12:21:16 +0200
committerMichael Niedermayer <michaelni@gmx.at>2013-09-06 12:21:16 +0200
commit5866c107a9b9d936f3b5c2385a5f724c900df01d (patch)
tree7bebe4966b3bd7d33d9f0201963633c7e242f622
parent92424a45d0c3154ad83aaba6e0fb8dbb17d8d1a4 (diff)
parentc3e6e8f06c42499bd020fd0b37f9542150e6067b (diff)
downloadffmpeg-5866c107a9b9d936f3b5c2385a5f724c900df01d.tar.gz
Merge commit 'c3e6e8f06c42499bd020fd0b37f9542150e6067b'
* commit 'c3e6e8f06c42499bd020fd0b37f9542150e6067b': mem: Do not check unsigned values for negative size Conflicts: libavutil/mem.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavutil/mem.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavutil/mem.c b/libavutil/mem.c
index 2d468ce362..53eeb19f4c 100644
--- a/libavutil/mem.c
+++ b/libavutil/mem.c
@@ -182,7 +182,7 @@ void *av_realloc_f(void *ptr, size_t nelem, size_t elsize)
void *av_realloc_array(void *ptr, size_t nmemb, size_t size)
{
- if (size <= 0 || nmemb >= INT_MAX / size)
+ if (!size || nmemb >= INT_MAX / size)
return NULL;
return av_realloc(ptr, nmemb * size);
}