MFC r271358: Fix array overrun, reported by Coverity.

This commit is contained in:
mav 2014-10-06 12:41:07 +00:00
parent 39e205854e
commit a21c949f78

View File

@ -7979,7 +7979,8 @@ ctl_persistent_reserve_in(struct ctl_scsiio *ctsio)
scsi_ulto2b(i / CTL_MAX_INIT_PER_PORT,
res_desc->rel_trgt_port_id);
len = 0;
port = softc->ctl_ports[i / CTL_MAX_INIT_PER_PORT];
port = softc->ctl_ports[
ctl_port_idx(i / CTL_MAX_INIT_PER_PORT)];
if (port != NULL)
len = ctl_create_iid(port,
i % CTL_MAX_INIT_PER_PORT,