Date: Mon, 20 Apr 2015 21:44:56 +0000 (UTC) From: "Pedro F. Giffuni" <pfg@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281795 - head/sys/cam/scsi Message-ID: <201504202144.t3KLiuoc076627@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: pfg Date: Mon Apr 20 21:44:55 2015 New Revision: 281795 URL: https://svnweb.freebsd.org/changeset/base/281795 Log: scsi_parse_transportid_rdma(): fix mismatch in memoty access size. Independently found by Coverity and gcc49. CID: 1230006 Reviewed by: ken MFC after: 5 days Modified: head/sys/cam/scsi/scsi_all.c Modified: head/sys/cam/scsi/scsi_all.c ============================================================================== --- head/sys/cam/scsi/scsi_all.c Mon Apr 20 21:27:25 2015 (r281794) +++ head/sys/cam/scsi/scsi_all.c Mon Apr 20 21:44:55 2015 (r281795) @@ -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?201504202144.t3KLiuoc076627>