aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/aacdec_fixed.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2017-11-05 21:20:07 +0100
committerMichael Niedermayer <michael@niedermayer.cc>2017-12-02 00:28:59 +0100
commit43299eabeabc61c6a5b56f85f0901591bd8fb205 (patch)
treeddf9b013d5548954daeb95a610cd45207017c06d /libavcodec/aacdec_fixed.c
parentf2763b8ba80cb258663807a5e61f028564b02ac3 (diff)
downloadffmpeg-43299eabeabc61c6a5b56f85f0901591bd8fb205.tar.gz
avcodec/aacdec_fixed: Fix undefined shift
Fixes: runtime error: left shift of negative value -801112064 Fixes: 3492/clusterfuzz-testcase-minimized-5784775283441664 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 fca198fb5bf42ba6b765b3f75b11738e4b4fc2a9) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec/aacdec_fixed.c')
-rw-r--r--libavcodec/aacdec_fixed.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/aacdec_fixed.c b/libavcodec/aacdec_fixed.c
index d6959b8ac2..535b323fc0 100644
--- a/libavcodec/aacdec_fixed.c
+++ b/libavcodec/aacdec_fixed.c
@@ -309,7 +309,7 @@ static av_always_inline void predict(PredictorState *ps, int *coef,
if (shift > 0) {
*coef += (unsigned)((pv.mant + (1 << (shift - 1))) >> shift);
} else
- *coef += (unsigned)(pv.mant << -shift);
+ *coef += (unsigned)pv.mant << -shift;
}
}