Patchwork [v2] xfs: prevent leaking uninitialized stack memory in FSGEOMETRY_V1

login
register
mail settings
Submitter Dan Rosenberg
Date Feb. 14, 2011, 1:45 p.m.
Message ID <1297691128.1857.4.camel@dan>
Download mbox | patch
Permalink /patch/555461/
State New, archived
Headers show

Comments

Patch

diff --git a/fs/xfs/xfs_fsops.c b/fs/xfs/xfs_fsops.c
index cec89dd..85668ef 100644
--- a/fs/xfs/xfs_fsops.c
+++ b/fs/xfs/xfs_fsops.c
@@ -53,6 +53,9 @@  xfs_fs_geometry(
 	xfs_fsop_geom_t		*geo,
 	int			new_version)
 {
+
+	memset(geo, 0, sizeof(*geo));
+
 	geo->blocksize = mp->m_sb.sb_blocksize;
 	geo->rtextsize = mp->m_sb.sb_rextsize;
 	geo->agblocks = mp->m_sb.sb_agblocks;