avcodec/aacdec_fixed: Limit index in vector_pow43()

Fixes: out of array access
Fixes: 26087/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_AAC_FIXED_fuzzer-5724825462767616

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:
Michael Niedermayer 2020-10-12 17:11:27 +02:00
parent 7ac87a2c34
commit 4f83a53638
1 changed files with 2 additions and 2 deletions

View File

@ -155,9 +155,9 @@ static void vector_pow43(int *coefs, int len)
for (i=0; i<len; i++) {
coef = coefs[i];
if (coef < 0)
coef = -(int)ff_cbrt_tab_fixed[-coef];
coef = -(int)ff_cbrt_tab_fixed[(-coef) & 8191];
else
coef = (int)ff_cbrt_tab_fixed[coef];
coef = (int)ff_cbrt_tab_fixed[ coef & 8191];
coefs[i] = coef;
}
}