Commit c94f9e85 authored by Michael Niedermayer's avatar Michael Niedermayer

avutil/mem: Fix flipped condition

Fixes return code and later null pointer dereference
Found-by: 's avatarLaurent Butti <laurentb@gmail.com>
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent f58cd286
......@@ -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;
}
......
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