You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-07-11 14:30:22 +02:00
avcodec/aacdec_fixed: Fix undefined shift in noise_scale()
Fixes: 13655/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_AAC_FIXED_fuzzer-5120559430500352
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 8ea211ab79
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
@ -220,7 +220,7 @@ static void noise_scale(int *coefs, int scale, int band_energy, int len)
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
s = s + 32;
|
s = s + 32;
|
||||||
round = 1 << (s-1);
|
round = s ? 1 << (s-1) : 0;
|
||||||
for (i=0; i<len; i++) {
|
for (i=0; i<len; i++) {
|
||||||
out = (int)((int64_t)((int64_t)coefs[i] * c + round) >> s);
|
out = (int)((int64_t)((int64_t)coefs[i] * c + round) >> s);
|
||||||
coefs[i] = out * ssign;
|
coefs[i] = out * ssign;
|
||||||
|
Reference in New Issue
Block a user