summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <[email protected]>2017-03-11 03:55:39 +0100
committerMichael Niedermayer <[email protected]>2017-05-17 20:35:19 +0200
commitbb0baaf58002507fe75b38437e31ae13e2f68333 (patch)
tree14be269d0feba5380cbd0c54f69528a928c53e85
parent7b91d4f07bb61c6e33d97f1154319af4c58af5e5 (diff)
avcodec/amrwbdec: Fix runtime error: left shift of negative value -1
Fixes: 763/clusterfuzz-testcase-6007567320875008 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg Signed-off-by: Michael Niedermayer <[email protected]> (cherry picked from commit 44e2105189ac66637f34c764febc349238250b1d) Signed-off-by: Michael Niedermayer <[email protected]>
-rw-r--r--libavcodec/amrwbdec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/amrwbdec.c b/libavcodec/amrwbdec.c
index 104a392363..1431870fa3 100644
--- a/libavcodec/amrwbdec.c
+++ b/libavcodec/amrwbdec.c
@@ -265,7 +265,7 @@ static void decode_pitch_lag_high(int *lag_int, int *lag_frac, int pitch_index,
*lag_frac = pitch_index - (*lag_int << 2) + 136;
} else if (pitch_index < 440) {
*lag_int = (pitch_index + 257 - 376) >> 1;
- *lag_frac = (pitch_index - (*lag_int << 1) + 256 - 376) << 1;
+ *lag_frac = (pitch_index - (*lag_int << 1) + 256 - 376) * 2;
/* the actual resolution is 1/2 but expressed as 1/4 */
} else {
*lag_int = pitch_index - 280;