summaryrefslogtreecommitdiff
path: root/sys/dev/isa/gscsio.c
diff options
context:
space:
mode:
authorAlexander Yurchenko <grange@cvs.openbsd.org>2009-06-02 12:12:36 +0000
committerAlexander Yurchenko <grange@cvs.openbsd.org>2009-06-02 12:12:36 +0000
commited860fe1c7cf8fc0126e575e7a620e567cbe5cdb (patch)
treeea34cbf24a526f8200adb95d8576a2179ad46bb5 /sys/dev/isa/gscsio.c
parent091923e0232ec2771385260914d34fc49c12a6a4 (diff)
Cope with logical device numbers gaps, this fixes out-of-bounds access
in an array. Problem found and ok deraadt@.
Diffstat (limited to 'sys/dev/isa/gscsio.c')
-rw-r--r--sys/dev/isa/gscsio.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/dev/isa/gscsio.c b/sys/dev/isa/gscsio.c
index 1a7b7dd5bd0..9f583fe365c 100644
--- a/sys/dev/isa/gscsio.c
+++ b/sys/dev/isa/gscsio.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: gscsio.c,v 1.10 2009/03/29 21:53:52 sthen Exp $ */
+/* $OpenBSD: gscsio.c,v 1.11 2009/06/02 12:12:35 grange Exp $ */
/*
* Copyright (c) 2004 Alexander Yurchenko <grange@openbsd.org>
*
@@ -42,9 +42,9 @@ struct gscsio_softc {
bus_space_tag_t sc_iot;
bus_space_handle_t sc_ioh;
- int sc_ld_en[GSCSIO_LDNUM];
- bus_space_handle_t sc_ld_ioh0[GSCSIO_LDNUM];
- bus_space_handle_t sc_ld_ioh1[GSCSIO_LDNUM];
+ int sc_ld_en[GSCSIO_LDN_LAST + 1];
+ bus_space_handle_t sc_ld_ioh0[GSCSIO_LDN_LAST + 1];
+ bus_space_handle_t sc_ld_ioh1[GSCSIO_LDN_LAST + 1];
/* ACCESS.bus */
struct gscsio_acb {