summaryrefslogtreecommitdiffstats
path: root/sys/cam
diff options
context:
space:
mode:
authorpfg <pfg@FreeBSD.org>2015-04-25 00:58:19 +0000
committerpfg <pfg@FreeBSD.org>2015-04-25 00:58:19 +0000
commit6fb31bb00a878bf1f736b9edb4c47587648b28f9 (patch)
tree7691fa71823a9d262d608fd029389e31bcff736a /sys/cam
parent44560bae19d728bb68b4453a03f49602eef1968c (diff)
downloadFreeBSD-src-6fb31bb00a878bf1f736b9edb4c47587648b28f9.zip
FreeBSD-src-6fb31bb00a878bf1f736b9edb4c47587648b28f9.tar.gz
MFC r281795:
scsi_parse_transportid_rdma(): fix mismatch in memory access size. Independently found by Coverity and gcc49. CID: 1230006 Reviewed by: ken
Diffstat (limited to 'sys/cam')
-rw-r--r--sys/cam/scsi/scsi_all.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/cam/scsi/scsi_all.c b/sys/cam/scsi/scsi_all.c
index a71f73b..6267693 100644
--- a/sys/cam/scsi/scsi_all.c
+++ b/sys/cam/scsi/scsi_all.c
@@ -6039,7 +6039,7 @@ scsi_parse_transportid_rdma(char *id_str, struct scsi_transportid_header **hdr,
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);
OpenPOWER on IntegriCloud