Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Leap:15.5:Update
virglrenderer.22702
0006-2abeb18-vrend-check-that-the-transfer-iov-...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0006-2abeb18-vrend-check-that-the-transfer-iov-holds-enough-data-.patch of Package virglrenderer.22702
commit 2abeb1802e3c005b17a7123e382171b3fb665971 Author: Gert Wollny <gert.wollny@collabora.com> Date: Tue Oct 8 17:27:01 2019 +0200 vrend: check that the transfer iov holds enough data for the data upload Closes #140 Signed-off-by: Gert Wollny <gert.wollny@collabora.com> Reviewed-by: Emil Velikov <emil.velikov@collabora.com> Index: virglrenderer-0.6.0/src/vrend_renderer.c =================================================================== --- virglrenderer-0.6.0.orig/src/vrend_renderer.c +++ virglrenderer-0.6.0/src/vrend_renderer.c @@ -4664,15 +4664,22 @@ static int vrend_renderer_transfer_write invert = true; } + send_size = util_format_get_nblocks(res->base.format, info->box->width, + info->box->height) * elsize; + if (res->target == GL_TEXTURE_3D || + res->target == GL_TEXTURE_2D_ARRAY || + res->target == GL_TEXTURE_CUBE_MAP_ARRAY) + send_size *= info->box->depth; + if (need_temp) { - send_size = util_format_get_nblocks(res->base.format, info->box->width, - info->box->height) * elsize * info->box->depth; data = malloc(send_size); if (!data) return ENOMEM; read_transfer_data(&res->base, iov, num_iovs, data, stride, info->box, info->offset, invert); } else { + if (send_size > iov[0].iov_len - info->offset) + return EINVAL; data = (char*)iov[0].iov_base + info->offset; }
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor