lavc/movtextdec.c: Avoid infinite loop on invalid data.
ffmpeg | branch: master | Sasi Inguva <isasi-at-google.com@ffmpeg.org> | Tue Sep 27 19:23:20 2016 -0700| [7e9e1b7070242a79fa6e3acd749d7fe76e39ea7b] | committer: Philip Langdale lavc/movtextdec.c: Avoid infinite loop on invalid data. Signed-off-by: Sasi Inguva <isasi@google.com>
http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=7e9e1b7070242a79fa...
libavcodec/movtextdec.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libavcodec/movtextdec.c b/libavcodec/movtextdec.c index abf8711..a33fff7 100644 --- a/libavcodec/movtextdec.c +++ b/libavcodec/movtextdec.c @@ -471,6 +471,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;
participants (1)
-
git@videolan.org