summaryrefslogtreecommitdiff
path: root/sys/dev/pci
diff options
context:
space:
mode:
authorKenneth R Westerback <krw@cvs.openbsd.org>2004-12-14 20:58:16 +0000
committerKenneth R Westerback <krw@cvs.openbsd.org>2004-12-14 20:58:16 +0000
commit894a26430c828f3171e67c5b01a6cbd7599940c5 (patch)
treeb1944662702c933f39d39b8236e70973f0b4b15f /sys/dev/pci
parentf8d970d2a0ae01fc7b1adcfe3e17c0693dda3a2b (diff)
Fix off-by-one. From FreeBSD r1.87. Also in NetBSD. Field being filled
(sk_vpd_readonly) is not currently used, but the memory being tromped on might be. ok millert@.
Diffstat (limited to 'sys/dev/pci')
-rw-r--r--sys/dev/pci/if_sk.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/pci/if_sk.c b/sys/dev/pci/if_sk.c
index fa3d7b0ae6f..8dbd2fb2efb 100644
--- a/sys/dev/pci/if_sk.c
+++ b/sys/dev/pci/if_sk.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_sk.c,v 1.53 2004/12/08 04:26:53 brad Exp $ */
+/* $OpenBSD: if_sk.c,v 1.54 2004/12/14 20:58:15 krw Exp $ */
/*
* Copyright (c) 1997, 1998, 1999, 2000
@@ -381,7 +381,7 @@ sk_vpd_read(struct sk_softc *sc)
sc->sk_vpd_readonly = malloc(res.vr_len, M_DEVBUF, M_NOWAIT);
if (sc->sk_vpd_readonly == NULL)
panic("sk_vpd_read");
- for (i = 0; i < res.vr_len + 1; i++)
+ for (i = 0; i < res.vr_len; i++)
sc->sk_vpd_readonly[i] = sk_vpd_readbyte(sc, i + pos);
}