vc4: Fix a potential src buffer overflow in shader rec validation.

This commit is contained in:
Eric Anholt 2014-07-31 13:14:00 -07:00
parent 027d730aff
commit 766ca5c7a5
1 changed files with 1 additions and 0 deletions

View File

@ -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) {