mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-03 05:10:03 +02:00
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>
(cherry picked from commit 9d00fb9d70
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
accf7d34a8
commit
d686026507
@ -491,7 +491,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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user