diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2019-08-19 01:30:53 +0200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2020-07-01 12:11:55 +0200 |
commit | b6b0d71e4d8b58d15686f10e3dd50b972177f492 (patch) | |
tree | 53f3344176a45a7b144f2e064eea081dd387d6b9 | |
parent | 1d8b19e2bf5b7f0008c6125d54a0880d83d50448 (diff) | |
download | ffmpeg-b6b0d71e4d8b58d15686f10e3dd50b972177f492.tar.gz |
avcodec/alsdec: Fix integer overflow in decode_var_block_data()
Fixes: signed integer overflow: 1927975249 - -514719744 cannot be represented in type 'int'
Fixes: 16413/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_ALS_fuzzer-5651206856245248
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: Thilo Borgmann <thilo.borgmann@mail.de>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 661a9b274b0181b2e36ff21fd13840f35992bea6)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r-- | libavcodec/alsdec.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/alsdec.c b/libavcodec/alsdec.c index 396e37ab4f..1add6a70e8 100644 --- a/libavcodec/alsdec.c +++ b/libavcodec/alsdec.c @@ -957,7 +957,7 @@ static int decode_var_block_data(ALSDecContext *ctx, ALSBlockData *bd) // reconstruct difference signal for prediction (joint-stereo) if (bd->js_blocks && bd->raw_other) { - int32_t *left, *right; + uint32_t *left, *right; if (bd->raw_other > raw_samples) { // D = R - L left = raw_samples; |