Commit 6ea27157 authored by Michael Niedermayer's avatar Michael Niedermayer

avcodec/movtextdec: Fix potential integer overflow

Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent 0edd5694
......@@ -485,7 +485,7 @@ static int mov_text_decode_frame(AVCodecContext *avctx,
m->size_var = 8;
//size_var is equal to 8 or 16 depending on the size of box
if (m->tracksize + tsmb_size > avpkt->size)
if (tsmb_size > avpkt->size - m->tracksize)
break;
for (size_t i = 0; i < box_count; i++) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment