diff options
author | cperciva <cperciva@FreeBSD.org> | 2004-02-22 01:03:38 +0000 |
---|---|---|
committer | cperciva <cperciva@FreeBSD.org> | 2004-02-22 01:03:38 +0000 |
commit | b5743daf691751f31c4c13910b083f04eb7be1d2 (patch) | |
tree | 732f3865bbfed99a149b95aa3b7a7c22b7387333 /sys | |
parent | 93bc079347ed43349b3a160286ceba8244cb6d91 (diff) | |
download | FreeBSD-src-b5743daf691751f31c4c13910b083f04eb7be1d2.zip FreeBSD-src-b5743daf691751f31c4c13910b083f04eb7be1d2.tar.gz |
Fix off-by-one error: sc->twe_drive is an array of TWE_MAX_UNITS elements.
Reported by: "Ted Unangst" <tedu@coverity.com>
Approved by: rwatson (mentor)
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/twe/twe.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/dev/twe/twe.c b/sys/dev/twe/twe.c index 32cc61d..787c49b 100644 --- a/sys/dev/twe/twe.c +++ b/sys/dev/twe/twe.c @@ -273,7 +273,7 @@ twe_del_unit(struct twe_softc *sc, int unit) { int error; - if (unit < 0 || unit > TWE_MAX_UNITS) + if (unit < 0 || unit >= TWE_MAX_UNITS) return (ENXIO); if (sc->twe_drive[unit].td_disk == NULL) |