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>2017-06-04 14:02:51 +0300
committerMichael Niedermayer <michael@niedermayer.cc>2017-06-06 04:44:35 +0300
commitaae731b9d39f18ee7d42e632a0139187435c35b6 (patch)
tree4b263097ac9995aaa9d765944a8950875ec4d261
parent4e6de49a5a4a9269db88825ca06f24a2e522add5 (diff)
avcodec/ac3dec_fixed: Fix runtime error: left shift of 419 by 23 places cannot be represented in type 'int'
Fixes: 1352/clusterfuzz-testcase-minimized-5757565017260032 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 136ce8baa4fc16cf38690cb457f7356c00e00a28) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r--libavcodec/ac3dec_fixed.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/ac3dec_fixed.c b/libavcodec/ac3dec_fixed.c
index 682fe935b0..5a868e4abf 100644
--- a/libavcodec/ac3dec_fixed.c
+++ b/libavcodec/ac3dec_fixed.c
@@ -69,7 +69,7 @@ static void scale_coefs (
int temp, temp1, temp2, temp3, temp4, temp5, temp6, temp7;
mul = (dynrng & 0x1f) + 0x20;
- shift = 4 - ((dynrng << 23) >> 28);
+ shift = 4 - (sign_extend(dynrng, 9) >> 5);
if (shift > 0 ) {
round = 1 << (shift-1);
for (i=0; i<len; i+=8) {