1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-21 10:55:51 +02:00

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

Signed-off-by: Sasi Inguva <isasi@google.com>
This commit is contained in:
Sasi Inguva 2016-09-27 19:23:20 -07:00 committed by Philip Langdale
parent 92de2c23a6
commit 7e9e1b7070

View File

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