Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2016-11-15 16:46:16 +0300
committerMichael Niedermayer <michael@niedermayer.cc>2016-11-26 17:12:27 +0300
commit63504a2d44e51999e3ce11a4b172a1b3965a2996 (patch)
tree66d60e9c3490eea597c70c742a15d8984de07450 /libavcodec
parentf9e76d3304b72b66434b0a6253daf10b50464e20 (diff)
avcodec/movtextdec: Fix potential integer overflow
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> (cherry picked from commit 6ea27157682200e5f78cadcabdb009eccd9dd9b1) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/movtextdec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/movtextdec.c b/libavcodec/movtextdec.c
index e7c3d490fd..a2b50b018f 100644
--- a/libavcodec/movtextdec.c
+++ b/libavcodec/movtextdec.c
@@ -490,7 +490,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++) {