ffmpeg | branch: release/3.0 | Sasi Inguva <isasi-at-google....@ffmpeg.org> | Tue Sep 27 19:23:20 2016 -0700| [82b58841c9d0e9d7d76d59438fe6b2a315e07e38] | committer: Michael Niedermayer
lavc/movtextdec.c: Avoid infinite loop on invalid data. Signed-off-by: Sasi Inguva <is...@google.com> (cherry picked from commit 7e9e1b7070242a79fa6e3acd749d7fe76e39ea7b) Signed-off-by: Michael Niedermayer <mich...@niedermayer.cc> > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=82b58841c9d0e9d7d76d59438fe6b2a315e07e38 --- libavcodec/movtextdec.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libavcodec/movtextdec.c b/libavcodec/movtextdec.c index 8d0e814..28f7b8f 100644 --- a/libavcodec/movtextdec.c +++ b/libavcodec/movtextdec.c @@ -477,6 +477,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; _______________________________________________ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog