svn commit: r208730 - head/bin/chio
Ulrich Spoerlein
uqs at FreeBSD.org
Wed Jun 2 09:34:42 UTC 2010
Author: uqs
Date: Wed Jun 2 09:34:41 2010
New Revision: 208730
URL: http://svn.freebsd.org/changeset/base/208730
Log:
Zero struct before reading from it
PR: 140384
Found by: clang static analyzer
MFC after: 3 weeks
Modified:
head/bin/chio/chio.c
Modified: head/bin/chio/chio.c
==============================================================================
--- head/bin/chio/chio.c Wed Jun 2 08:43:18 2010 (r208729)
+++ head/bin/chio/chio.c Wed Jun 2 09:34:41 2010 (r208730)
@@ -1072,6 +1072,7 @@ find_element(char *voltag, uint16_t *et,
/* Read in the changer slots */
if (cp.cp_nslots > 0) {
+ (void) memset(&cesr, 0, sizeof(cesr));
cesr.cesr_element_type = CHET_ST;
cesr.cesr_element_base = 0;
cesr.cesr_element_count = cp.cp_nslots;
More information about the svn-src-all
mailing list