Commit 8b8e9fe8 authored by Janne Grunau's avatar Janne Grunau

lf mask: calculate vertical mask correctly

Fixes an error introduced in 22d3b6d9 (!294).
Fixes an use of uninitialized value in loop_filter_v_sb128y_c with
clusterfuzz-testcase-minimized-dav1d_fuzzer-5682084585144320. The
original sample in 22d3b6d9
clusterfuzz-testcase-minimized-dav1d_fuzzer-5691087507685376 shows no
regression. Credits to oss-fuzz.
parent b3291ede
......@@ -235,7 +235,7 @@ void bytefn(dav1d_loopfilter_sbrow)(const Dav1dFrameContext *const f,
x < f->sb128w; x++, a++)
{
uint16_t (*const y_vmask)[2] = lflvl[x].filter_y[1][starty4];
const unsigned w = imin(32, (f->w4 >> sbl2) - x);
const unsigned w = imin(32, f->w4 - (x << 5));
for (unsigned mask = 1, i = 0; i < w; mask <<= 1, i++) {
const int sidx = mask >= 0x10000U;
const unsigned smask = mask >> (sidx << 4);
......
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