diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2020-04-26 19:29:39 +0200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2020-05-02 17:30:02 +0200 |
commit | 49ae034b42234486712a02f9b00253a0975cea02 (patch) | |
tree | 8d0e2e5be9cb74788cfbef6f18dbe71c14f84b5b /libavcodec | |
parent | 62e4003780cad60ac1371fef892da08c27069964 (diff) | |
download | ffmpeg-49ae034b42234486712a02f9b00253a0975cea02.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>
Diffstat (limited to 'libavcodec')
-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) |