mirror of
https://git.videolan.org/git/ffmpeg.git
synced 2024-09-10 09:31:06 +02: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;
|
||||
if (!queue->samples || queue->len >= queue->size) {
|
||||
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)
|
||||
return;
|
||||
queue->size += 10;
|
||||
|
Loading…
Reference in New Issue
Block a user