mirror of
https://gitee.com/openharmony/third_party_ffmpeg
synced 2024-11-27 13:10:37 +00:00
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>
This commit is contained in:
parent
f58cd2867a
commit
c94f9e8542
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user