When clearing rtmsg, pass &rtmsg to bzero() instead of the address of

just the header

Reported by:	Coverity
CID:		1007568, 1194256
MFC after:	1 week
This commit is contained in:
truckman 2016-05-17 04:03:45 +00:00
parent 393a88e32e
commit 7dc92ff146

View File

@ -739,7 +739,7 @@ update_arptab(u_char *ep, in_addr_t ipaddr)
/* Get the type and interface index */
rt = &rtmsg.rthdr;
bzero(rt, sizeof(rtmsg));
bzero(&rtmsg, sizeof(rtmsg));
rt->rtm_version = RTM_VERSION;
rt->rtm_addrs = RTA_DST;
rt->rtm_type = RTM_GET;