mirror of https://git.ffmpeg.org/ffmpeg.git
avcodec/dxv: Check op_offset in dxv_decompress_cocg()
Fixes: signed integer overflow: -2147483648 - 12 cannot be represented in type 'int' Fixes: 14732/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_DXV_fuzzer-5735273129836544 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:
parent
a99ffb5bb4
commit
8e520843dd
|
@ -745,6 +745,9 @@ static int dxv_decompress_cocg(DXVContext *ctx, GetByteContext *gb,
|
||||||
int skip0, skip1, oi0 = 0, oi1 = 0;
|
int skip0, skip1, oi0 = 0, oi1 = 0;
|
||||||
int ret, state0 = 0, state1 = 0;
|
int ret, state0 = 0, state1 = 0;
|
||||||
|
|
||||||
|
if (op_offset < 12)
|
||||||
|
return AVERROR_INVALIDDATA;
|
||||||
|
|
||||||
dst = tex_data;
|
dst = tex_data;
|
||||||
bytestream2_skip(gb, op_offset - 12);
|
bytestream2_skip(gb, op_offset - 12);
|
||||||
if (op_size0 > max_op_size0)
|
if (op_size0 > max_op_size0)
|
||||||
|
|
Loading…
Reference in New Issue