aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2017-05-28 20:08:49 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2017-05-31 02:40:02 +0200
commit7f0c66b8cf0a27ff28f203aad7bb292bae11b145 (patch)
treeef99215d70d3a41dee4d03b84e87b667fad05b4c
parent62979de16865de7351bb6dd2748c953ee0fc8548 (diff)
downloadffmpeg-7f0c66b8cf0a27ff28f203aad7bb292bae11b145.tar.gz
avcodec/aac_defines: Add missing () to AAC_HALF_SUM() macro
Fixes: runtime error: shift exponent 1073741848 is too large for 32-bit type 'INTFLOAT' (aka 'int') Fixes: 1880/clusterfuzz-testcase-minimized-4900645322620928 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 872bac81590ccbec40ba7ad203421d9e38d1b253) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r--libavcodec/aac_defines.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/aac_defines.h b/libavcodec/aac_defines.h
index b417850838..83d70af896 100644
--- a/libavcodec/aac_defines.h
+++ b/libavcodec/aac_defines.h
@@ -72,7 +72,7 @@ typedef int AAC_SIGNE;
#define AAC_MSUB31_V3(x, y, z) (int)((((int64_t)(x) * (z)) - \
((int64_t)(y) * (z)) + \
0x40000000) >> 31)
-#define AAC_HALF_SUM(x, y) (x) >> 1 + (y) >> 1
+#define AAC_HALF_SUM(x, y) (((x) >> 1) + ((y) >> 1))
#define AAC_SRA_R(x, y) (int)(((x) + (1 << ((y) - 1))) >> (y))
#else