mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2026-02-04 14:30:55 +08:00
avcodec/aac/aacdec_usac: Limit sfo from noise offset to be above -200
Fixes: out of array read Fixes: 397731127/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_AAC_LATM_fuzzer-5577772965101568 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
@@ -1023,8 +1023,9 @@ static void apply_noise_fill(AACDecContext *ac, SingleChannelElement *sce,
|
||||
}
|
||||
}
|
||||
|
||||
if (band_quantized_to_zero)
|
||||
sce->sfo[g*ics->max_sfb + sfb] += noise_offset;
|
||||
if (band_quantized_to_zero) {
|
||||
sce->sfo[g*ics->max_sfb + sfb] = FFMAX(sce->sfo[g*ics->max_sfb + sfb] + noise_offset, -200);
|
||||
}
|
||||
}
|
||||
coef += g_len << 7;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user