diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2020-02-11 23:56:45 +0100 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2020-07-01 12:49:26 +0200 |
commit | b503ec1ae14e9ec073abc668e12a046bf4d4090d (patch) | |
tree | 2081657cb9b655e3dde37c28686adf9947d58859 | |
parent | baa0304074f98aa5e70d11447055375a20c9a6f3 (diff) | |
download | ffmpeg-b503ec1ae14e9ec073abc668e12a046bf4d4090d.tar.gz |
avcodec/apedec: Fix invalid shift with 24 bps
Fixes: left shift of negative value -463
Fixes: 20542/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_APE_fuzzer-5688714435231744
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 8e278672294f28a3feaba0a38460afd51f0fadda)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r-- | libavcodec/apedec.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/apedec.c b/libavcodec/apedec.c index ff9750722c..89deb57914 100644 --- a/libavcodec/apedec.c +++ b/libavcodec/apedec.c @@ -1543,7 +1543,7 @@ static int ape_decode_frame(AVCodecContext *avctx, void *data, for (ch = 0; ch < s->channels; ch++) { sample24 = (int32_t *)frame->data[ch]; for (i = 0; i < blockstodecode; i++) - *sample24++ = s->decoded[ch][i] << 8; + *sample24++ = s->decoded[ch][i] * 256; } break; } |