Commit 9be86b89 authored by Marc-André Lureau's avatar Marc-André Lureau Committed by Dave Airlie

renderer: check box bounds

Fix found thanks to american fuzzy lop.
Signed-off-by: default avatarMarc-André Lureau <marcandre.lureau@redhat.com>
parent 901b77d2
......@@ -4337,7 +4337,8 @@ static bool check_transfer_bounds(struct vrend_resource *res,
/* check mipmap level is in bounds */
if (info->level > res->base.last_level)
return false;
if (info->box->x < 0 || info->box->y < 0)
return false;
/* these will catch bad y/z/w/d with 1D textures etc */
lwidth = u_minify(res->base.width0, info->level);
if (info->box->width > lwidth)
......
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