svn commit: r272622 - stable/10/sys/cam/ctl
Alexander Motin
mav at FreeBSD.org
Mon Oct 6 12:41:08 UTC 2014
Author: mav
Date: Mon Oct 6 12:41:07 2014
New Revision: 272622
URL: https://svnweb.freebsd.org/changeset/base/272622
Log:
MFC r271358: Fix array overrun, reported by Coverity.
Modified:
stable/10/sys/cam/ctl/ctl.c
Directory Properties:
stable/10/ (props changed)
Modified: stable/10/sys/cam/ctl/ctl.c
==============================================================================
--- stable/10/sys/cam/ctl/ctl.c Mon Oct 6 12:40:15 2014 (r272621)
+++ stable/10/sys/cam/ctl/ctl.c Mon Oct 6 12:41:07 2014 (r272622)
@@ -7979,7 +7979,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,
More information about the svn-src-stable-10
mailing list