Skip to content

Commit

Permalink
avformat/mxfdec: Fix Sign error in mxf_read_primer_pack()
Browse files Browse the repository at this point in the history
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>
(cherry picked from commit 9d00fb9)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
  • Loading branch information
孙浩(晓黑) authored and michaelni committed Sep 1, 2017
1 parent f173cdf commit a4e85b2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libavformat/mxfdec.c
Expand Up @@ -421,7 +421,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;
}
Expand Down

0 comments on commit a4e85b2

Please sign in to comment.