Fix memory overrun.

Coverity CID:	1092478
Approved by:	re (gjb)
Sponsored by:	FreeBSD Foundation
This commit is contained in:
trasz 2013-10-09 13:45:07 +00:00
parent 33f6245f1b
commit 751ffd6b5a

View File

@ -146,7 +146,7 @@ kernel_add(const struct connection *conn, const char *target)
int error;
memset(&isa, 0, sizeof(isa));
memcpy(&isa.isa_conf, &conn->conn_conf, sizeof(isa));
memcpy(&isa.isa_conf, &conn->conn_conf, sizeof(isa.isa_conf));
strlcpy(isa.isa_conf.isc_target, target,
sizeof(isa.isa_conf.isc_target));
isa.isa_conf.isc_discovery = 0;