mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-03-08 05:28:40 +00:00
avformat/movenchint: use realloc_array() to protect against integer overflow
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
63621762ec
commit
05b7a635dc
@ -105,7 +105,7 @@ static void sample_queue_push(HintSampleQueue *queue, uint8_t *data, int size,
|
|||||||
return;
|
return;
|
||||||
if (!queue->samples || queue->len >= queue->size) {
|
if (!queue->samples || queue->len >= queue->size) {
|
||||||
HintSample *samples;
|
HintSample *samples;
|
||||||
samples = av_realloc(queue->samples, sizeof(HintSample) * (queue->size + 10));
|
samples = av_realloc_array(queue->samples, queue->size + 10, sizeof(HintSample));
|
||||||
if (!samples)
|
if (!samples)
|
||||||
return;
|
return;
|
||||||
queue->size += 10;
|
queue->size += 10;
|
||||||
|
Loading…
Reference in New Issue
Block a user