Fix array overrun, reported by Coverity.

CID:		1229970
This commit is contained in:
Alexander Motin 2014-09-10 06:56:45 +00:00
parent 0d5de8346a
commit 436b3d2f5a

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,