diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2020-04-26 19:29:39 +0200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2020-07-01 12:49:26 +0200 |
commit | e2a3317510a96a59bb52f73fbc0c66ef9ebd1088 (patch) | |
tree | 51e4b3a5873e23aeaa6b97f1845531f6c75c2f67 | |
parent | a4e9221bdea1dc39eab18164681d1fb82021ff16 (diff) | |
download | ffmpeg-e2a3317510a96a59bb52f73fbc0c66ef9ebd1088.tar.gz |
avcodec/alacdsp: Fix invalid shift in append_extra_bits()
Fixes: left shift of negative value -1
Fixes: 21390/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_ALAC_fuzzer-6242539519868928
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 49ae034b42234486712a02f9b00253a0975cea02)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r-- | libavcodec/alacdsp.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/alacdsp.c b/libavcodec/alacdsp.c index ecbaedb067..9996eb4319 100644 --- a/libavcodec/alacdsp.c +++ b/libavcodec/alacdsp.c @@ -49,7 +49,7 @@ static void append_extra_bits(int32_t *buffer[2], int32_t *extra_bits_buffer[2], for (ch = 0; ch < channels; ch++) for (i = 0; i < nb_samples; i++) - buffer[ch][i] = (buffer[ch][i] << extra_bits) | extra_bits_buffer[ch][i]; + buffer[ch][i] = ((unsigned)buffer[ch][i] << extra_bits) | extra_bits_buffer[ch][i]; } av_cold void ff_alacdsp_init(ALACDSPContext *c) |