mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-19 05:49:09 +02:00
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/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> (cherry picked from commit 02346292a334a51f6da802146b782bdb01ae9b4e) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
e5661aa706
commit
351381a3e3
@ -1409,7 +1409,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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user