summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2010-06-07 19:42:27 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2010-06-07 19:42:27 +0000
commit48713b1d270232c5c0b54b2b65f886a5e36a005c (patch)
treed3a78fa24b9d9072bca782c0e88d6e9140dd82f4 /sys
parent0ae2d978d7974363342e6319a7990fbddadf1cd3 (diff)
Proper range check in radeon_emit_packets(); ok oga@
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/pci/drm/radeon_state.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/dev/pci/drm/radeon_state.c b/sys/dev/pci/drm/radeon_state.c
index f53103fd154..2baf3b573c1 100644
--- a/sys/dev/pci/drm/radeon_state.c
+++ b/sys/dev/pci/drm/radeon_state.c
@@ -2110,7 +2110,7 @@ radeon_emit_packets(drm_radeon_private_t * dev_priv, struct drm_file *file_priv,
int sz, reg;
int *data = (int *)cmdbuf->buf;
- if (id >= RADEON_MAX_STATE_PACKETS)
+ if (id < 0 || id >= RADEON_MAX_STATE_PACKETS)
return EINVAL;
sz = packet[id].len;