mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2026-01-06 06:05:32 +01:00
lavc/movtextdec.c: Avoid infinite loop on invalid data.
Signed-off-by: Sasi Inguva <isasi@google.com>
(cherry picked from commit 7e9e1b7070)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
committed by
Michael Niedermayer
parent
e5bf7ab3e7
commit
82b58841c9
@@ -477,6 +477,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;
|
||||
|
||||
Reference in New Issue
Block a user