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
This commit is contained in:
Pedro F. Giffuni 2015-04-20 21:44:55 +00:00
parent ac074de850
commit 8188e2e04e
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=281795

View File

@ -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);