Module Name:    src
Committed By:   jakllsch
Date:           Sun Jan  2 21:37:01 UTC 2011

Modified Files:
        src/sys/lib/libsa: ext2fs.c

Log Message:
Zero the in-memory super block after allocation.  It contains a pointer
that, if not properly initialized, could be improperly deallocated.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sys/lib/libsa/ext2fs.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/lib/libsa/ext2fs.c
diff -u src/sys/lib/libsa/ext2fs.c:1.8 src/sys/lib/libsa/ext2fs.c:1.9
--- src/sys/lib/libsa/ext2fs.c:1.8	Mon Oct 19 18:41:16 2009
+++ src/sys/lib/libsa/ext2fs.c	Sun Jan  2 21:37:01 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: ext2fs.c,v 1.8 2009/10/19 18:41:16 bouyer Exp $	*/
+/*	$NetBSD: ext2fs.c,v 1.9 2011/01/02 21:37:01 jakllsch Exp $	*/
 
 /*
  * Copyright (c) 1997 Manuel Bouyer.
@@ -510,6 +510,7 @@
 
 	/* allocate space and read super block */
 	fs = alloc(sizeof(*fs));
+	memset(fs, 0, sizeof(*fs));
 	fp->f_fs = fs;
 	twiddle();
 

Reply via email to