aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2018-01-14 00:39:39 +0100
committerMichael Niedermayer <michael@niedermayer.cc>2018-07-08 13:07:06 +0200
commit7d79d8f6ef79afc42defe37e7191dc0d65f1f1fc (patch)
tree35c20a89af7f629225a559ccdfe6a656c3dbde7c
parent4eb8e1bce212fae4eab043d0eb095d36a133e6cd (diff)
downloadffmpeg-7d79d8f6ef79afc42defe37e7191dc0d65f1f1fc.tar.gz
avcodec/ac3dec_fixed: Fix integer overflow in scale_coefs()
Fixes: runtime error: signed integer overflow: 2147483520 + 128 cannot be represented in type 'int' Fixes: 4800/clusterfuzz-testcase-minimized-6110372403609600 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 a1f38c75893c852cf19dcf3e4553549ba1e70950) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r--libavcodec/ac3dec_fixed.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/ac3dec_fixed.c b/libavcodec/ac3dec_fixed.c
index 56b62548ec..ef5fa5501a 100644
--- a/libavcodec/ac3dec_fixed.c
+++ b/libavcodec/ac3dec_fixed.c
@@ -64,8 +64,8 @@ static void scale_coefs (
int dynrng,
int len)
{
- int i, shift, round;
- unsigned mul;
+ int i, shift;
+ unsigned mul, round;
int temp, temp1, temp2, temp3, temp4, temp5, temp6, temp7;
mul = (dynrng & 0x1f) + 0x20;