aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2020-02-01 23:25:42 +0100
committerMichael Niedermayer <michael@niedermayer.cc>2020-07-01 12:49:26 +0200
commit876997d46287f53585e86060074013c83d9166c5 (patch)
tree98f27d493bb0604b6eed4dae4b7b2a4d0dabfd50 /libavcodec
parentcb3495c0cb5fc160b29bbd85692781b6ad09c7fc (diff)
downloadffmpeg-876997d46287f53585e86060074013c83d9166c5.tar.gz
avcodec/mlpdsp: Fix a invalid shift in ff_mlp_rematrix_channel()
Fixes: left shift of negative value -2 Fixes: 20305/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TRUEHD_fuzzer-5677196618498048 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Reviewed-by: Jai Luthra <me@jailuthra.in> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> (cherry picked from commit fcc9f13717c8c3fe08ca5caf957c39e76ea35e4f) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/mlpdsp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/mlpdsp.c b/libavcodec/mlpdsp.c
index 32a4503b64..12bef3a721 100644
--- a/libavcodec/mlpdsp.c
+++ b/libavcodec/mlpdsp.c
@@ -79,7 +79,7 @@ void ff_mlp_rematrix_channel(int32_t *samples,
if (matrix_noise_shift) {
index &= access_unit_size_pow2 - 1;
- accum += noise_buffer[index] << (matrix_noise_shift + 7);
+ accum += noise_buffer[index] * (1 << (matrix_noise_shift + 7));
index += index2;
}