Commit 02346292 authored by Michael Niedermayer's avatar Michael Niedermayer

avcodec/alsdec: fix mantisse shift

Fixes: shift exponent -1 is negative
Fixes: 16039/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_ALS_fuzzer-5656825657032704

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpegSigned-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent 70432eac
......@@ -1404,7 +1404,11 @@ static SoftFloat_IEEE754 multiply(SoftFloat_IEEE754 a, SoftFloat_IEEE754 b) {
}
}
mantissa = (unsigned int)(mantissa_temp >> cutoff_bit_count);
if (cutoff_bit_count >= 0) {
mantissa = (unsigned int)(mantissa_temp >> cutoff_bit_count);
} else {
mantissa = (unsigned int)(mantissa_temp <<-cutoff_bit_count);
}
// Need one more shift?
if (mantissa & 0x01000000ul) {
......
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