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:
parent
ab737ab31d
commit
ca216c71c7
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user