mirror of https://github.com/mstorsjo/fdk-aac.git
Avoid undefined shifts in calculateSbrEnvelope
Fixes: 26845/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_LIBFDK_AAC_fuzzer-5670674796118016 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
This commit is contained in:
parent
4e944af756
commit
d23a21ab42
|
@ -1477,8 +1477,10 @@ void calculateSbrEnvelope(
|
||||||
|
|
||||||
for (k = 0; k < noSubbands; k++) {
|
for (k = 0; k < noSubbands; k++) {
|
||||||
int sc = scale_change - pNrgs->nrgGain_e[k] + (sc_change - 1);
|
int sc = scale_change - pNrgs->nrgGain_e[k] + (sc_change - 1);
|
||||||
pNrgs->nrgGain[k] >>= sc;
|
|
||||||
pNrgs->nrgGain_e[k] += sc;
|
pNrgs->nrgGain_e[k] += sc;
|
||||||
|
if (sc > 31)
|
||||||
|
sc = 31;
|
||||||
|
pNrgs->nrgGain[k] >>= sc;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!useLP) {
|
if (!useLP) {
|
||||||
|
|
Loading…
Reference in New Issue