Fixes: out of array read Fixes: 397731127/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_AAC_LATM_fuzzer-5577772965101568
Showing the changes to libavcodec (1 of 1 file). Show all
Unified · Split
| @@ -1023,8 +1023,9 @@ static void apply_noise_fill(AACDecContext *ac, SingleChannelElement *sce, · 1022 unmodified lines | ||
| 1023 | 1023 | } |
| 1024 | 1024 | } |
| 1025 | 1025 | |
| 1026 | − if (band_quantized_to_zero) | |
| 1027 | − sce->sfo[g*ics->max_sfb + sfb] += noise_offset; | |
| 1026 | + if (band_quantized_to_zero) { | |
| 1027 | + sce->sfo[g*ics->max_sfb + sfb] = FFMAX(sce->sfo[g*ics->max_sfb + sfb] + noise_offset, -200); | |
| 1028 | + } | |
| 1028 | 1029 | } |
| 1029 | 1030 | coef += g_len << 7; |
| 1030 | 1031 | } |