diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2019-12-07 02:14:16 +0300 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2020-01-12 01:31:18 +0300 |
commit | 794352ae9d1cb32b4b9e45d3affb83763f4ee12e (patch) | |
tree | 36381eb304707b33c4dc52bcc95c5782e1501f9c /libavcodec/adpcm.c | |
parent | 6a865cec5e7584ef476f394fc55c1fc91cec1a14 (diff) |
avcodec/adpcm: Fix overflow in FFABS() IMA_EA_EACS
Fixes: negation of -2147483648 cannot be represented in type 'int'; cast to an unsigned type to negate this value to itself
Fixes: 19235/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_ADPCM_IMA_EA_EACS_fuzzer-5680878952382464
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/adpcm.c')
-rw-r--r-- | libavcodec/adpcm.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/adpcm.c b/libavcodec/adpcm.c index b99a21002c..7b5b3d9698 100644 --- a/libavcodec/adpcm.c +++ b/libavcodec/adpcm.c @@ -1233,7 +1233,7 @@ static int adpcm_decode_frame(AVCodecContext *avctx, void *data, } for (i=0; i<=st; i++) { c->status[i].predictor = bytestream2_get_le32u(&gb); - if (FFABS(c->status[i].predictor) > (1<<16)) + if (FFABS((int64_t)c->status[i].predictor) > (1<<16)) return AVERROR_INVALIDDATA; } |