1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-01-29 22:00:58 +02:00

lavc/movtextdec.c: Avoid infinite loop on invalid data.

Signed-off-by: Sasi Inguva <isasi@google.com>
(cherry picked from commit 7e9e1b7070242a79fa6e3acd749d7fe76e39ea7b)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
Sasi Inguva 2016-09-27 19:23:20 -07:00 committed by Michael Niedermayer
parent ab737ab31d
commit ca216c71c7

View File

@ -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;