summaryrefslogtreecommitdiffstats
path: root/sys/cam
diff options
context:
space:
mode:
authorpfg <pfg@FreeBSD.org>2015-04-20 21:44:55 +0000
committerpfg <pfg@FreeBSD.org>2015-04-20 21:44:55 +0000
commiteb426c25138eec03ac8a409e9e872a21e401a523 (patch)
tree2496716bbc821c1aa9b2217e7749039a69ee4146 /sys/cam
parentf61d9a586b1c8a53e18ac363bfb0cfb2ff93d723 (diff)
downloadFreeBSD-src-eb426c25138eec03ac8a409e9e872a21e401a523.zip
FreeBSD-src-eb426c25138eec03ac8a409e9e872a21e401a523.tar.gz
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
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 3266d5b3f..a429259 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