Commit 5584c0bb authored by Michael Niedermayer's avatar Michael Niedermayer

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/ffmpegSigned-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent cce37a22
......@@ -823,8 +823,11 @@ static void revert_acfilter(WmallDecodeCtx *s, int tile_size)
pred >>= scaling;
s->channel_residues[ich][i] += (unsigned)pred;
}
for (j = 0; j < order; j++)
prevvalues[j] = s->channel_residues[ich][tile_size - j - 1];
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];
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment