Fix array overrun, reported by Coverity.

CID:		1229970
This commit is contained in:
mav 2014-09-10 06:56:45 +00:00
parent a209c226c5
commit 4db7e51eb2

View File

@ -7963,7 +7963,8 @@ retry:
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,