Date: Sat, 25 Apr 2015 00:58:19 +0000 (UTC) From: "Pedro F. Giffuni" <pfg@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: r281961 - stable/10/sys/cam/scsi Message-ID: <201504250058.t3P0wJMM038801@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: pfg Date: Sat Apr 25 00:58:19 2015 New Revision: 281961 URL: https://svnweb.freebsd.org/changeset/base/281961 Log: MFC r281795: scsi_parse_transportid_rdma(): fix mismatch in memory access size. Independently found by Coverity and gcc49. CID: 1230006 Reviewed by: ken Modified: stable/10/sys/cam/scsi/scsi_all.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/scsi/scsi_all.c ============================================================================== --- stable/10/sys/cam/scsi/scsi_all.c Sat Apr 25 00:52:01 2015 (r281960) +++ stable/10/sys/cam/scsi/scsi_all.c Sat Apr 25 00:58:19 2015 (r281961) @@ -6039,7 +6039,7 @@ scsi_parse_transportid_rdma(char *id_str goto bailout; } *alloc_len = sizeof(*rdma); - bzero(rdma, sizeof(rdma)); + bzero(rdma, *alloc_len); rdma->format_protocol = SCSI_PROTO_RDMA | SCSI_TRN_RDMA_FORMAT_DEFAULT; bcopy(rdma_id, rdma->initiator_port_id, SCSI_TRN_RDMA_PORT_LEN);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201504250058.t3P0wJMM038801>