Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2019-09-06 11:46:38 +0300
committerMichael Niedermayer <michael@niedermayer.cc>2019-09-24 18:53:39 +0300
commitb30c07cc2b9ee5bc52e1782eba9aa40e99085a7e (patch)
treedd2be3dfa0fe2623cd075fcce1b15026e7fa8619 /libavcodec/alac.c
parent0831cbfe099192098d91e049ed9cf03c5a9cb376 (diff)
avcodec/alac: Fix invalid shifts in 20/24 bps
Fixes: left shift of negative value -256 Fixes: 16892/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_ALAC_fuzzer-4880802642395136 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/alac.c')
-rw-r--r--libavcodec/alac.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/alac.c b/libavcodec/alac.c
index c606f2af0e..fbe427595e 100644
--- a/libavcodec/alac.c
+++ b/libavcodec/alac.c
@@ -397,13 +397,13 @@ static int decode_element(AVCodecContext *avctx, AVFrame *frame, int ch_index,
case 20: {
for (ch = 0; ch < channels; ch++) {
for (i = 0; i < alac->nb_samples; i++)
- alac->output_samples_buffer[ch][i] <<= 12;
+ alac->output_samples_buffer[ch][i] *= 1 << 12;
}}
break;
case 24: {
for (ch = 0; ch < channels; ch++) {
for (i = 0; i < alac->nb_samples; i++)
- alac->output_samples_buffer[ch][i] <<= 8;
+ alac->output_samples_buffer[ch][i] *= 1 << 8;
}}
break;
}