Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 23 May 2016 05:43:59 +0000 (UTC)
From:      Don Lewis <truckman@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject:   svn commit: r300472 - stable/10/usr.sbin/rarpd
Message-ID:  <201605230543.u4N5hx5W094769@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: truckman
Date: Mon May 23 05:43:59 2016
New Revision: 300472
URL: https://svnweb.freebsd.org/changeset/base/300472

Log:
  MFC r300002
  
  When clearing rtmsg, pass &rtmsg to bzero() instead of the address of
  just the header
  
  Reported by:	Coverity
  CID:		1007568, 1194256

Modified:
  stable/10/usr.sbin/rarpd/rarpd.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/usr.sbin/rarpd/rarpd.c
==============================================================================
--- stable/10/usr.sbin/rarpd/rarpd.c	Mon May 23 05:41:53 2016	(r300471)
+++ stable/10/usr.sbin/rarpd/rarpd.c	Mon May 23 05:43:59 2016	(r300472)
@@ -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;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201605230543.u4N5hx5W094769>