summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2017-11-05 21:20:07 +0100
committerMichael Niedermayer <michael@niedermayer.cc>2017-11-13 19:54:20 +0100
commitfca198fb5bf42ba6b765b3f75b11738e4b4fc2a9 (patch)
tree851a30c4f89354b5b25877c8bff6a3d6fd468968
parent770c934fa1635f4fadf5db4fc5cc5ad15d82455a (diff)
downloadffmpeg-fca198fb5bf42ba6b765b3f75b11738e4b4fc2a9.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>
-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 ffd577c789..f96999efb4 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;
}
}