svn commit: r340699 - head/sys/kern

Mark Johnston markj at FreeBSD.org
Tue Nov 20 20:32:11 UTC 2018


Author: markj
Date: Tue Nov 20 20:32:10 2018
New Revision: 340699
URL: https://svnweb.freebsd.org/changeset/base/340699

Log:
  Clear pad bytes in the struct exported by kern.ntp_pll.gettime.
  
  Reported by:	Thomas Barabosch, Fraunhofer FKIE
  MFC after:	3 days
  Sponsored by:	The FreeBSD Foundation

Modified:
  head/sys/kern/kern_ntptime.c

Modified: head/sys/kern/kern_ntptime.c
==============================================================================
--- head/sys/kern/kern_ntptime.c	Tue Nov 20 20:31:23 2018	(r340698)
+++ head/sys/kern/kern_ntptime.c	Tue Nov 20 20:32:10 2018	(r340699)
@@ -300,6 +300,8 @@ ntp_sysctl(SYSCTL_HANDLER_ARGS)
 {
 	struct ntptimeval ntv;	/* temporary structure */
 
+	memset(&ntv, 0, sizeof(ntv));
+
 	NTP_LOCK();
 	ntp_gettime1(&ntv);
 	NTP_UNLOCK();


More information about the svn-src-head mailing list