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>2020-09-24 22:59:04 +0300
committerMichael Niedermayer <michael@niedermayer.cc>2021-02-02 16:18:20 +0300
commit3dffbfac2c8714bb6deb9fc6c8646af81c6c8bce (patch)
tree5bcf598259a0f63119e27b710c02ece1bdbcc681 /libavcodec
parent106103d7b50cb119d03611203e11cf5acc1edab0 (diff)
avcodec/takdsp: Fix negative shift in decorrelate_sf()
Fixes: left shift of negative value -4 Fixes: 25723/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TAK_fuzzer-6250580752990208 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 4f54f530039db149808478796e8389c14eb73095) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/takdsp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/takdsp.c b/libavcodec/takdsp.c
index 2441c2baa6..9cb8052596 100644
--- a/libavcodec/takdsp.c
+++ b/libavcodec/takdsp.c
@@ -65,7 +65,7 @@ static void decorrelate_sf(int32_t *p1, int32_t *p2, int length, int dshift, int
for (i = 0; i < length; i++) {
int32_t a = p1[i];
int32_t b = p2[i];
- b = dfactor * (b >> dshift) + 128 >> 8 << dshift;
+ b = (unsigned)(dfactor * (b >> dshift) + 128 >> 8) << dshift;
p1[i] = b - a;
}
}