MFC r281795:

scsi_parse_transportid_rdma(): fix mismatch in memory access size.

Independently found by Coverity and gcc49.

CID:		1230006
Reviewed by:	ken
This commit is contained in:
pfg 2015-04-25 00:58:19 +00:00
parent 44560bae19
commit 6fb31bb00a

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