mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-03-03 19:18:01 +00:00
avcodec/dpx: Check bits_per_color earlier
Fixes: shift exponent 251 is too large for 32-bit type 'int'
Fixes: 32147/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_DPX_fuzzer-5519111675314176
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit c093eb3031
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
9a0a851fae
commit
ef02e54454
@ -206,6 +206,9 @@ static int decode_frame(AVCodecContext *avctx,
|
||||
return AVERROR_PATCHWELCOME;
|
||||
}
|
||||
|
||||
if (bits_per_color > 32)
|
||||
return AVERROR_INVALIDDATA;
|
||||
|
||||
buf += 820;
|
||||
avctx->sample_aspect_ratio.num = read32(&buf, endian);
|
||||
avctx->sample_aspect_ratio.den = read32(&buf, endian);
|
||||
|
Loading…
Reference in New Issue
Block a user