svn commit: r300002 - head/usr.sbin/rarpd

Don Lewis truckman at FreeBSD.org
Tue May 17 04:03:46 UTC 2016


Author: truckman
Date: Tue May 17 04:03:45 2016
New Revision: 300002
URL: https://svnweb.freebsd.org/changeset/base/300002

Log:
  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

Modified:
  head/usr.sbin/rarpd/rarpd.c

Modified: head/usr.sbin/rarpd/rarpd.c
==============================================================================
--- head/usr.sbin/rarpd/rarpd.c	Tue May 17 00:32:36 2016	(r300001)
+++ head/usr.sbin/rarpd/rarpd.c	Tue May 17 04:03:45 2016	(r300002)
@@ -739,7 +739,7 @@ update_arptab(u_char *ep, in_addr_t ipad
 
 	/* 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;


More information about the svn-src-head mailing list