aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2017-05-17 15:51:46 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2017-06-16 01:05:27 +0200
commitf66f1c5232587affacb8cecc230f5020a2f512c2 (patch)
tree3161ea4efe39e639fafabe9c7be6cf3938e07647
parent3814f965aa0737f9103c1d2cf457e5c74dec7011 (diff)
downloadffmpeg-f66f1c5232587affacb8cecc230f5020a2f512c2.tar.gz
avcodec/aacdec_template: Fix fixed point scale in decode_cce()
Fixes: runtime error: shift exponent 1073741824 is too large for 32-bit type 'int' Fixes: 1654/clusterfuzz-testcase-minimized-5151903795118080 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> (cherry picked from commit 53a502206a9ea698926694d7252526fe00d1ea44) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r--libavcodec/aacdec_template.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/libavcodec/aacdec_template.c b/libavcodec/aacdec_template.c
index f730ad935e..c3591c2719 100644
--- a/libavcodec/aacdec_template.c
+++ b/libavcodec/aacdec_template.c
@@ -2159,7 +2159,11 @@ static int decode_cce(AACContext *ac, GetBitContext *gb, ChannelElement *che)
coup->coupling_point += get_bits1(gb) || (coup->coupling_point >> 1);
sign = get_bits(gb, 1);
- scale = AAC_RENAME(cce_scale)[get_bits(gb, 2)];
+#if USE_FIXED
+ scale = get_bits(gb, 2);
+#else
+ scale = cce_scale[get_bits(gb, 2)];
+#endif
if ((ret = decode_ics(ac, sce, gb, 0, 0)))
return ret;