mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-02-24 07:46:56 +00:00
avcodec/wmalosslessdec: Fix loop in revert_acfilter()
Fixes: out of array read
Fixes: 20059/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_WMALOSSLESS_fuzzer-5691776237305856
No testcase except the fuzzed one.
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 5584c0bb94
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
e1aa37ce1a
commit
44da920eb7
@ -827,7 +827,10 @@ static void revert_acfilter(WmallDecodeCtx *s, int tile_size)
|
||||
pred >>= scaling;
|
||||
s->channel_residues[ich][i] += (unsigned)pred;
|
||||
}
|
||||
for (j = 0; j < order; j++)
|
||||
for (j = order - 1; j >= 0; j--)
|
||||
if (tile_size <= j) {
|
||||
prevvalues[j] = prevvalues[j - tile_size];
|
||||
}else
|
||||
prevvalues[j] = s->channel_residues[ich][tile_size - j - 1];
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user