From: Eric Anholt Date: Thu, 31 Jul 2014 20:14:00 +0000 (-0700) Subject: vc4: Fix a potential src buffer overflow in shader rec validation. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=766ca5c7a5a28e6f7c0b37d6408e54f3d86b77b8;p=mesa.git vc4: Fix a potential src buffer overflow in shader rec validation. --- diff --git a/src/gallium/drivers/vc4/vc4_simulator_validate.c b/src/gallium/drivers/vc4/vc4_simulator_validate.c index 855947395e9..e16b3728eac 100644 --- a/src/gallium/drivers/vc4/vc4_simulator_validate.c +++ b/src/gallium/drivers/vc4/vc4_simulator_validate.c @@ -462,6 +462,7 @@ validate_shader_rec(struct drm_device *dev, memcpy(pkt_v, pkt_u, packet_size); exec->shader_rec_u += packet_size; exec->shader_rec_v += packet_size; + exec->shader_rec_size -= packet_size; for (i = 0; i < nr_relocs; i++) { if (src_handles[i] >= exec->bo_count) {