[FFmpeg-cvslog] avcodec/movtextdec: run mov_text_cleanup() before overwriting pointers

Michael Niedermayer git at videolan.org
Fri Mar 10 00:35:31 EET 2017


ffmpeg | branch: master | Michael Niedermayer <michael at niedermayer.cc> | Wed Mar  8 22:54:10 2017 +0100| [bac9c03ed9328c63aba46e280ba408431b53fcb4] | committer: Michael Niedermayer

avcodec/movtextdec: run mov_text_cleanup() before overwriting pointers

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>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=bac9c03ed9328c63aba46e280ba408431b53fcb4
---

 libavcodec/movtextdec.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/libavcodec/movtextdec.c b/libavcodec/movtextdec.c
index 6de1500..fb5085c 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;



More information about the ffmpeg-cvslog mailing list