Commit 872bac81 authored by Michael Niedermayer's avatar Michael Niedermayer

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/ffmpegSigned-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent 67020711
...@@ -72,7 +72,7 @@ typedef int AAC_SIGNE; ...@@ -72,7 +72,7 @@ typedef int AAC_SIGNE;
#define AAC_MSUB31_V3(x, y, z) (int)((((int64_t)(x) * (z)) - \ #define AAC_MSUB31_V3(x, y, z) (int)((((int64_t)(x) * (z)) - \
((int64_t)(y) * (z)) + \ ((int64_t)(y) * (z)) + \
0x40000000) >> 31) 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)) #define AAC_SRA_R(x, y) (int)(((x) + (1 << ((y) - 1))) >> (y))
#else #else
......
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