[FFmpeg-cvslog] avformat/movenchint: use realloc_array() to protect against integer overflow
Michael Niedermayer
git at videolan.org
Sun Sep 22 15:52:04 CEST 2013
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sun Sep 22 15:06:22 2013 +0200| [05b7a635dc1e5266fb367ce8b0019a0830317879] | committer: Michael Niedermayer
avformat/movenchint: use realloc_array() to protect against integer overflow
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=05b7a635dc1e5266fb367ce8b0019a0830317879
---
libavformat/movenchint.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavformat/movenchint.c b/libavformat/movenchint.c
index b909748..9d6a66e 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;
More information about the ffmpeg-cvslog
mailing list