diff options
author | Janne Grunau <janne-vlc@jannau.net> | 2018-11-09 21:57:08 +0300 |
---|---|---|
committer | Janne Grunau <janne-vlc@jannau.net> | 2018-11-09 22:07:23 +0300 |
commit | 8b8e9fe85f6875a86ed66726e8964450a318cdc6 (patch) | |
tree | 3a9ff831f5a9a9edb062b5a8b3d8811a338892c7 /src/lf_apply_tmpl.c | |
parent | b3291ede922d27a20d06c323c1b6b7febc269d6b (diff) |
lf mask: calculate vertical mask correctly
Fixes an error introduced in 22d3b6d9807 (!294).
Fixes an use of uninitialized value in loop_filter_v_sb128y_c with
clusterfuzz-testcase-minimized-dav1d_fuzzer-5682084585144320. The
original sample in 22d3b6d9807
clusterfuzz-testcase-minimized-dav1d_fuzzer-5691087507685376 shows no
regression. Credits to oss-fuzz.
Diffstat (limited to 'src/lf_apply_tmpl.c')
-rw-r--r-- | src/lf_apply_tmpl.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lf_apply_tmpl.c b/src/lf_apply_tmpl.c index 4d501c7..691ee18 100644 --- a/src/lf_apply_tmpl.c +++ b/src/lf_apply_tmpl.c @@ -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); |