Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 6 Oct 2014 12:41:08 +0000 (UTC)
From:      Alexander Motin <mav@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject:   svn commit: r272622 - stable/10/sys/cam/ctl
Message-ID:  <201410061241.s96Cf8M9059466@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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,



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201410061241.s96Cf8M9059466>