summaryrefslogtreecommitdiffstats
path: root/libavcodec/aacdec_fixed.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2017-05-28 03:34:09 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2017-05-28 03:34:43 +0200
commit6c3a63fc3d1be7ac947e38a165a299c9e5d37764 (patch)
tree6831762cdf4394abefda72d9c8ef353ae9da88b0 /libavcodec/aacdec_fixed.c
parent7f50c25124a015a539823077bb302ff0c7ce8963 (diff)
downloadffmpeg-streaming-6c3a63fc3d1be7ac947e38a165a299c9e5d37764.zip
ffmpeg-streaming-6c3a63fc3d1be7ac947e38a165a299c9e5d37764.tar.gz
avcodec/aacdec_fixed: Fix multiple runtime error: shift exponent 127 is too large for 32-bit type 'int'
Fixes: 1851/clusterfuzz-testcase-minimized-5692607495667712 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec/aacdec_fixed.c')
-rw-r--r--libavcodec/aacdec_fixed.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libavcodec/aacdec_fixed.c b/libavcodec/aacdec_fixed.c
index 53a971c..950ce20 100644
--- a/libavcodec/aacdec_fixed.c
+++ b/libavcodec/aacdec_fixed.c
@@ -370,7 +370,9 @@ static void apply_dependent_coupling_fixed(AACContext *ac,
shift = (gain-1024) >> 3;
}
- if (shift < 0) {
+ if (shift < -31) {
+ // Nothing to do
+ } else if (shift < 0) {
shift = -shift;
round = 1 << (shift - 1);
OpenPOWER on IntegriCloud