diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2019-12-07 00:14:16 +0100 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2020-07-01 12:49:26 +0200 |
commit | 622e695d801dc5f385060a339b533dd4d5d7626a (patch) | |
tree | 2f95aafcd07306113270844fdb606b97d04ecd35 | |
parent | f99ecf94cc2da2e846ce8de666a262aad3a7d60b (diff) | |
download | ffmpeg-622e695d801dc5f385060a339b533dd4d5d7626a.tar.gz |
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>
(cherry picked from commit 794352ae9d1cb32b4b9e45d3affb83763f4ee12e)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-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 5bee48171a..1acd36877f 100644 --- a/libavcodec/adpcm.c +++ b/libavcodec/adpcm.c @@ -1140,7 +1140,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; } |