summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2014-07-31 13:14:00 -0700
committerEric Anholt <[email protected]>2014-08-11 14:45:31 -0700
commit766ca5c7a5a28e6f7c0b37d6408e54f3d86b77b8 (patch)
treee84909115f44c9235efeb195d71217ee2311745b
parent027d730aff4abf89f8c01049d245c670c6740a26 (diff)
vc4: Fix a potential src buffer overflow in shader rec validation.
-rw-r--r--src/gallium/drivers/vc4/vc4_simulator_validate.c1
1 files changed, 1 insertions, 0 deletions
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) {