[FFmpeg-devel] [PATCH 6/6] avcodec/movtextdec: run mov_text_cleanup() before overwriting pointers

Michael Niedermayer michael at niedermayer.cc
Thu Mar 9 00:28:43 EET 2017


Fixes: memleak
Fixes: 741/clusterfuzz-testcase-586996200452915

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
---
 libavcodec/movtextdec.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/libavcodec/movtextdec.c b/libavcodec/movtextdec.c
index 6de15004fc..fb5085c3e8 100644
--- a/libavcodec/movtextdec.c
+++ b/libavcodec/movtextdec.c
@@ -459,6 +459,8 @@ static int mov_text_decode_frame(AVCodecContext *avctx,
     end = ptr + FFMIN(2 + text_length, avpkt->size);
     ptr += 2;
 
+    mov_text_cleanup(m);
+
     tsmb_size = 0;
     m->tracksize = 2 + text_length;
     m->style_entries = 0;
-- 
2.11.0



More information about the ffmpeg-devel mailing list