[FFmpeg-cvslog] lavc/movtextdec.c: Avoid infinite loop on invalid data.
Sasi Inguva
git at videolan.org
Wed Oct 5 04:29:25 EEST 2016
ffmpeg | branch: release/2.8 | Sasi Inguva <isasi-at-google.com at ffmpeg.org> | Tue Sep 27 19:23:20 2016 -0700| [ca216c71c77db13171717a69307a56c35f3246be] | committer: Michael Niedermayer
lavc/movtextdec.c: Avoid infinite loop on invalid data.
Signed-off-by: Sasi Inguva <isasi at google.com>
(cherry picked from commit 7e9e1b7070242a79fa6e3acd749d7fe76e39ea7b)
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=ca216c71c77db13171717a69307a56c35f3246be
---
libavcodec/movtextdec.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/libavcodec/movtextdec.c b/libavcodec/movtextdec.c
index 257d598..e7c3d49 100644
--- a/libavcodec/movtextdec.c
+++ b/libavcodec/movtextdec.c
@@ -476,6 +476,10 @@ static int mov_text_decode_frame(AVCodecContext *avctx,
tsmb_type = AV_RB32(tsmb);
tsmb += 4;
+ if (tsmb_size == 0) {
+ return AVERROR_INVALIDDATA;
+ }
+
if (tsmb_size == 1) {
if (m->tracksize + 16 > avpkt->size)
break;
More information about the ffmpeg-cvslog
mailing list