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:
commit
5866c107a9
@ -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);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user