Commit 05b7a635 authored by Michael Niedermayer's avatar Michael Niedermayer

avformat/movenchint: use realloc_array() to protect against integer overflow

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 63621762
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment