Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-08-09 15:37:18 +0400
committerMichael Niedermayer <michaelni@gmx.at>2013-08-09 15:53:25 +0400
commit211374e52a933a2b3f21a4d6e66e9f1b0623e44e (patch)
tree9ebe12b8d4e5062be8a1f6521266ae94daf196fe /libavutil
parent1bf2461765c58aad5829ea45a2885d11f50b73f0 (diff)
avutil/mem: Fix flipped condition
Fixes return code and later null pointer dereference Found-by: Laurent Butti <laurentb@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at> (cherry picked from commit c94f9e854228e0ea00e1de8769d8d3f7cab84a55) Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavutil')
-rw-r--r--libavutil/mem.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavutil/mem.c b/libavutil/mem.c
index 76f6b65d1a..20dfd629a8 100644
--- a/libavutil/mem.c
+++ b/libavutil/mem.c
@@ -191,7 +191,7 @@ int av_reallocp_array(void *ptr, size_t nmemb, size_t size)
{
void **ptrptr = ptr;
*ptrptr = av_realloc_f(*ptrptr, nmemb, size);
- if (!*ptrptr && !(nmemb && size))
+ if (!*ptrptr && nmemb && size)
return AVERROR(ENOMEM);
return 0;
}