From 766ca5c7a5a28e6f7c0b37d6408e54f3d86b77b8 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Thu, 31 Jul 2014 13:14:00 -0700 Subject: [PATCH] vc4: Fix a potential src buffer overflow in shader rec validation. --- src/gallium/drivers/vc4/vc4_simulator_validate.c | 1 + 1 file changed, 1 insertion(+) 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) { -- 2.30.2