Commit 8e87d146 authored by Michael Niedermayer's avatar Michael Niedermayer

avcodec/aacdec_fixed: Fix runtime error: signed integer overflow: -2147483648...

avcodec/aacdec_fixed: Fix runtime error: signed integer overflow: -2147483648 * -1 cannot be represented in type 'int'

Fixes: 1825/clusterfuzz-testcase-minimized-6002833050566656

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpegSigned-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent 356194fc
...@@ -187,7 +187,7 @@ static void subband_scale(int *dst, int *src, int scale, int offset, int len) ...@@ -187,7 +187,7 @@ static void subband_scale(int *dst, int *src, int scale, int offset, int len)
round = 1U << (s-1); round = 1U << (s-1);
for (i=0; i<len; i++) { for (i=0; i<len; i++) {
out = (int)((int64_t)((int64_t)src[i] * c + round) >> s); out = (int)((int64_t)((int64_t)src[i] * c + round) >> s);
dst[i] = out * ssign; dst[i] = out * (unsigned)ssign;
} }
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment