summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/vc4/kernel
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2015-07-29 14:40:10 -0700
committerEric Anholt <[email protected]>2015-07-30 15:46:27 -0700
commit86541cf8cea77f4b887dd061e7d6e3e4767f86fd (patch)
treed6c34c8dcfc32a5dc1cc6d73b08978370ed6c032 /src/gallium/drivers/vc4/kernel
parentd0173bce371e3aafa732600c1456a9282ff5d900 (diff)
vc4: Avoid overflowing various static tables.
Diffstat (limited to 'src/gallium/drivers/vc4/kernel')
-rw-r--r--src/gallium/drivers/vc4/kernel/vc4_validate.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gallium/drivers/vc4/kernel/vc4_validate.c b/src/gallium/drivers/vc4/kernel/vc4_validate.c
index cba948a1c67..674ca637864 100644
--- a/src/gallium/drivers/vc4/kernel/vc4_validate.c
+++ b/src/gallium/drivers/vc4/kernel/vc4_validate.c
@@ -487,7 +487,7 @@ vc4_validate_bin_cl(struct drm_device *dev,
u8 cmd = *(uint8_t *)src_pkt;
const struct cmd_info *info;
- if (cmd > ARRAY_SIZE(cmd_info)) {
+ if (cmd >= ARRAY_SIZE(cmd_info)) {
DRM_ERROR("0x%08x: packet %d out of bounds\n",
src_offset, cmd);
return -EINVAL;