diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2019-05-21 01:33:03 +0200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2019-06-05 13:19:59 +0200 |
commit | 8e520843dd76a644c019134ac7b17eba9f1118b3 (patch) | |
tree | 95e5ddc82f1092b76712d9750d7ca7a2da4a688b /libavcodec | |
parent | a99ffb5bb4454c625748972d9389cfaa5433a342 (diff) | |
download | ffmpeg-8e520843dd76a644c019134ac7b17eba9f1118b3.tar.gz |
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>
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/dxv.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libavcodec/dxv.c b/libavcodec/dxv.c index 6fe5516505..5fd1844094 100644 --- a/libavcodec/dxv.c +++ b/libavcodec/dxv.c @@ -745,6 +745,9 @@ static int dxv_decompress_cocg(DXVContext *ctx, GetByteContext *gb, int skip0, skip1, oi0 = 0, oi1 = 0; int ret, state0 = 0, state1 = 0; + if (op_offset < 12) + return AVERROR_INVALIDDATA; + dst = tex_data; bytestream2_skip(gb, op_offset - 12); if (op_size0 > max_op_size0) |