mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-12-08 06:09:50 +00:00
Merge commit '04b0f0e371'
* commit '04b0f0e371':
mem: uninline av_malloc(z)_array()
Merged-by: James Almer <jamrial@gmail.com>
This commit is contained in:
commit
4959f18a8e
2 changed files with 16 additions and 12 deletions
|
|
@ -181,6 +181,20 @@ int av_reallocp(void *ptr, size_t size)
|
|||
return 0;
|
||||
}
|
||||
|
||||
void *av_malloc_array(size_t nmemb, size_t size)
|
||||
{
|
||||
if (!size || nmemb >= INT_MAX / size)
|
||||
return NULL;
|
||||
return av_malloc(nmemb * size);
|
||||
}
|
||||
|
||||
void *av_mallocz_array(size_t nmemb, size_t size)
|
||||
{
|
||||
if (!size || nmemb >= INT_MAX / size)
|
||||
return NULL;
|
||||
return av_mallocz(nmemb * size);
|
||||
}
|
||||
|
||||
void *av_realloc_array(void *ptr, size_t nmemb, size_t size)
|
||||
{
|
||||
if (!size || nmemb >= INT_MAX / size)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue