diff options
author | Sasi Inguva <isasi-at-google.com@ffmpeg.org> | 2016-09-27 19:23:20 -0700 |
---|---|---|
committer | Philip Langdale <philipl@overt.org> | 2016-09-27 19:49:02 -0700 |
commit | 7e9e1b7070242a79fa6e3acd749d7fe76e39ea7b (patch) | |
tree | d6879c7c3589c4b9152ebb4d101e7a881a25a347 /libavcodec/movtextdec.c | |
parent | 92de2c23a61e5a8d8ced28b4697cae395f35e46c (diff) | |
download | ffmpeg-7e9e1b7070242a79fa6e3acd749d7fe76e39ea7b.tar.gz |
lavc/movtextdec.c: Avoid infinite loop on invalid data.
Signed-off-by: Sasi Inguva <isasi@google.com>
Diffstat (limited to 'libavcodec/movtextdec.c')
-rw-r--r-- | libavcodec/movtextdec.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libavcodec/movtextdec.c b/libavcodec/movtextdec.c index abf8711a9c..a33fff7518 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; |