summaryrefslogtreecommitdiff
path: root/libavformat/movenchint.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-09-22 15:06:22 +0200
committerMichael Niedermayer <michaelni@gmx.at>2013-09-22 15:06:22 +0200
commit05b7a635dc1e5266fb367ce8b0019a0830317879 (patch)
tree733b62fb2092763880ccf2ed71c9f88a0c3bbd96 /libavformat/movenchint.c
parent63621762eccf4c825ef1d42251b0d45d0c498826 (diff)
avformat/movenchint: use realloc_array() to protect against integer overflow
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/movenchint.c')
-rw-r--r--libavformat/movenchint.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/movenchint.c b/libavformat/movenchint.c
index b909748e41..9d6a66e8ce 100644
--- a/libavformat/movenchint.c
+++ b/libavformat/movenchint.c
@@ -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;