Commit 4a646a0c authored by Janne Grunau's avatar Janne Grunau

intra_pred: fix ubsan issues with max_width/height in 2f251bd1

Seen with clusterfuzz-testcase-minimized-dav1d_fuzzer-5712042518904832.
parent 8948e5af
......@@ -349,7 +349,7 @@ static void filter_edge(pixel *const out, const int sz,
assert(strength > 0);
int i = 0;
for (; i < lim_from; i++)
for (; i < imin(sz, lim_from); i++)
out[i] = in[iclip(i, from, to - 1)];
for (; i < imin(lim_to, sz); i++) {
int s = 0;
......
......@@ -986,7 +986,7 @@ void bytefn(dav1d_recon_b_intra)(Dav1dTileContext *const t, const enum BlockSize
angle | sm_uv_fl,
(f->cur.p.p.w + ss_hor -
4 * (t->bx & ~ss_hor)) >> ss_hor,
(f->cur.p.p.w + ss_ver -
(f->cur.p.p.h + ss_ver -
4 * (t->by & ~ss_ver)) >> ss_ver);
if (DEBUG_BLOCK_INFO && DEBUG_B_PIXELS) {
hex_dump(edge - uv_t_dim->h * 4, uv_t_dim->h * 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