diff options
author | 孙浩(晓黑) <tony.sh@alibaba-inc.com> | 2017-08-29 23:59:21 +0200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2017-09-01 01:48:39 +0200 |
commit | 9d00fb9d70ee8c0cc7002b89318c5be00f1bbdad (patch) | |
tree | 177f3c412a234eeaf7d3b14167fe4f9549b56e65 /libavformat/mxfdec.c | |
parent | 900f39692ca0337a98a7cf047e4e2611071810c2 (diff) | |
download | ffmpeg-9d00fb9d70ee8c0cc7002b89318c5be00f1bbdad.tar.gz |
avformat/mxfdec: Fix Sign error in mxf_read_primer_pack()
Fixes: 20170829B.mxf
Co-Author: 张洪亮(望初)" <wangchu.zhl@alibaba-inc.com>
Found-by: Xiaohei and Wangchu from Alibaba Security Team
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavformat/mxfdec.c')
-rw-r--r-- | libavformat/mxfdec.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/mxfdec.c b/libavformat/mxfdec.c index 6adb77d81f..91731a7533 100644 --- a/libavformat/mxfdec.c +++ b/libavformat/mxfdec.c @@ -500,7 +500,7 @@ static int mxf_read_primer_pack(void *arg, AVIOContext *pb, int tag, int size, U avpriv_request_sample(pb, "Primer pack item length %d", item_len); return AVERROR_PATCHWELCOME; } - if (item_num > 65536) { + if (item_num > 65536 || item_num < 0) { av_log(mxf->fc, AV_LOG_ERROR, "item_num %d is too large\n", item_num); return AVERROR_INVALIDDATA; } |