1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-01-24 13:56:33 +02:00

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>
This commit is contained in:
Michael Niedermayer 2013-09-06 12:21:16 +02:00
commit 5866c107a9

View File

@ -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);
}