diff options
author | Marc-André Lureau <marcandre.lureau@redhat.com> | 2016-01-20 13:58:03 +0100 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2016-02-10 12:39:47 +1000 |
commit | 9be86b89fb25e54f7823a395dda99948d554fda1 (patch) | |
tree | 16834dc52e6569c316b145a1d52e26195419445e | |
parent | 901b77d29e87b056beb70ccfca53f046115b80b4 (diff) |
renderer: check box bounds
Fix found thanks to american fuzzy lop.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
-rw-r--r-- | src/vrend_renderer.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/vrend_renderer.c b/src/vrend_renderer.c index 80641c2..12a9f7c 100644 --- a/src/vrend_renderer.c +++ b/src/vrend_renderer.c @@ -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) |