summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <[email protected]>2017-11-05 21:20:07 +0100
committerMichael Niedermayer <[email protected]>2017-12-07 23:38:06 +0100
commitdb82e4f1e059056a591f9b143c26ea3de7c5e308 (patch)
tree0b6175c7181e92f1e577b5f09ff09b01e63b71c4
parent168ee582559d904360261c8dab9eca2ba6490583 (diff)
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 <[email protected]> (cherry picked from commit fca198fb5bf42ba6b765b3f75b11738e4b4fc2a9) Signed-off-by: Michael Niedermayer <[email protected]>
-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 d802f3834f..32bd1454bd 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;
}
}