aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2017-05-21 01:43:04 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2017-06-16 01:05:27 +0200
commit90ff230fd18e720c6923e4488bb05ca557a360d9 (patch)
tree21bf62a8b5d1da523e843571d46a2fd49f832761
parentf5212833b2e2ddd009faa6089df6d1640c8b85b3 (diff)
downloadffmpeg-90ff230fd18e720c6923e4488bb05ca557a360d9.tar.gz
avcodec/sbrdsp_fixed: fix runtime error: left shift of 1 by 31 places cannot be represented in type 'int'
Fixes: part of 1709/clusterfuzz-testcase-minimized-4513580554649600 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 384508b2ff69bc3fad1e1c2e7de0dcd0913c6208) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r--libavcodec/sbrdsp_fixed.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/sbrdsp_fixed.c b/libavcodec/sbrdsp_fixed.c
index f4e3de0c71..924da83c85 100644
--- a/libavcodec/sbrdsp_fixed.c
+++ b/libavcodec/sbrdsp_fixed.c
@@ -229,11 +229,11 @@ static void sbr_hf_gen_c(int (*X_high)[2], const int (*X_low)[2],
static void sbr_hf_g_filt_c(int (*Y)[2], const int (*X_high)[40][2],
const SoftFloat *g_filt, int m_max, intptr_t ixh)
{
- int m, r;
+ int m;
int64_t accu;
for (m = 0; m < m_max; m++) {
- r = 1 << (22-g_filt[m].exp);
+ int64_t r = 1LL << (22-g_filt[m].exp);
accu = (int64_t)X_high[m][ixh][0] * ((g_filt[m].mant + 0x40)>>7);
Y[m][0] = (int)((accu + r) >> (23-g_filt[m].exp));