avcodec/atrac9dec: Check precision_fine/coarse
Clipping is done as it was preferred in review See: [FFmpeg-devel] [PATCH 1/5] avcodec/atrac9dec: Check precision_fine/coarse Fixes: out of array access Fixes: 18330/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_ATRAC9_fuzzer-5641113058148352 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> (cherry picked from commit 19b8db2908bf0fd248da1b2126e2592ade66c40c) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
3a91eb37c4
commit
e57cb9429a
@ -190,7 +190,7 @@ static inline void calc_precision(ATRAC9Context *s, ATRAC9BlockData *b,
|
||||
for (int i = 0; i < b->q_unit_cnt; i++) {
|
||||
c->precision_fine[i] = 0;
|
||||
if (c->precision_coarse[i] > 15) {
|
||||
c->precision_fine[i] = c->precision_coarse[i] - 15;
|
||||
c->precision_fine[i] = FFMIN(c->precision_coarse[i], 30) - 15;
|
||||
c->precision_coarse[i] = 15;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user