svn commit: r300856 - head/tools/tools/ioat
Garrett Cooper
ngie at FreeBSD.org
Fri May 27 17:43:00 UTC 2016
Author: ngie
Date: Fri May 27 17:42:59 2016
New Revision: 300856
URL: https://svnweb.freebsd.org/changeset/base/300856
Log:
Initialize `t` with memset(.., 0, ..)
This will help ensure that we're not using random garbage on the stack by
accident with respect to the variable
MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division
Modified:
head/tools/tools/ioat/ioatcontrol.c
Modified: head/tools/tools/ioat/ioatcontrol.c
==============================================================================
--- head/tools/tools/ioat/ioatcontrol.c Fri May 27 17:40:29 2016 (r300855)
+++ head/tools/tools/ioat/ioatcontrol.c Fri May 27 17:42:59 2016 (r300856)
@@ -35,6 +35,7 @@ __FBSDID("$FreeBSD$");
#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
+#include <string.h>
#include <sysexits.h>
#include <unistd.h>
@@ -104,6 +105,8 @@ main(int argc, char **argv)
bool fflag, rflag, Eflag, mflag;
unsigned modeflags;
+ memset(&t, 0, sizeof(t));
+
fflag = rflag = Eflag = mflag = false;
modeflags = 0;
More information about the svn-src-all
mailing list