summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2009-08-29 11:02:52 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2009-08-29 11:02:52 +0000
commit78809f8015952e2e70a3971f49cd20252226ea67 (patch)
tree6bcd562bbcaa9f43f290df9fcb594d0a71fd80bc /sys
parentb262b8f057a533ea306bed3bb0e644599948f2da (diff)
incorrect array bounds check in I2OVERBOSE error reporting.
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/i2o/ioprbs.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/i2o/ioprbs.c b/sys/dev/i2o/ioprbs.c
index f82503668bb..5e231f01648 100644
--- a/sys/dev/i2o/ioprbs.c
+++ b/sys/dev/i2o/ioprbs.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ioprbs.c,v 1.16 2009/02/16 21:19:06 miod Exp $ */
+/* $OpenBSD: ioprbs.c,v 1.17 2009/08/29 11:02:51 miod Exp $ */
/*
* Copyright (c) 2001 Niklas Hallqvist
@@ -565,7 +565,7 @@ ioprbs_intr(struct device *dv, struct iop_msg *im, void *reply)
if (!err && rb->reqstatus != I2O_STATUS_SUCCESS) {
detail = letoh16(rb->detail);
#ifdef I2OVERBOSE
- if (detail > sizeof(ioprbs_errors) / sizeof(ioprbs_errors[0]))
+ if (detail >= sizeof(ioprbs_errors) / sizeof(ioprbs_errors[0]))
errstr = "<unknown>";
else
errstr = ioprbs_errors[detail];