You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-04 22:03:09 +02:00
avformat/mxfdec: Check llen addition for overflow
Fixes: signed integer overflow: 9223372036854775807 + 1 cannot be represented in type 'long' Fixes: 377971441/clusterfuzz-testcase-minimized-ffmpeg_dem_MXF_fuzzer-4966030696316928 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
@ -496,6 +496,9 @@ static int klv_read_packet(MXFContext *mxf, KLVPacket *klv, AVIOContext *pb)
|
||||
if (length < 0)
|
||||
return length;
|
||||
klv->length = length;
|
||||
if (klv->offset > INT64_MAX - 16 - llen)
|
||||
return AVERROR_INVALIDDATA;
|
||||
|
||||
pos = klv->offset + 16 + llen;
|
||||
if (pos > INT64_MAX - length)
|
||||
return AVERROR_INVALIDDATA;
|
||||
|
Reference in New Issue
Block a user