Commit 5866c107 authored by Michael Niedermayer's avatar Michael Niedermayer

Merge commit 'c3e6e8f0'

* commit 'c3e6e8f0':
  mem: Do not check unsigned values for negative size

Conflicts:
	libavutil/mem.c
Merged-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parents 92424a45 c3e6e8f0
......@@ -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);
}
......
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