Commit 44e21051 authored by Michael Niedermayer's avatar Michael Niedermayer

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/ffmpegSigned-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent f4c2302e
......@@ -262,7 +262,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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment