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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2013-09-22 15:06:22 +02:00
parent 63621762ec
commit 05b7a635dc

View File

@ -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;