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)
This commit is contained in:
parent
e821c36489
commit
27021df2ff
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user