[PATCH:sessreg 2/5] Zero initialize struct utmpx, as we already do for struct utmp

Alan Coopersmith alan.coopersmith at oracle.com
Tue Nov 4 19:13:23 PST 2014


Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>
---
 sessreg.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/sessreg.c b/sessreg.c
index 9e0354a..1c13ece 100644
--- a/sessreg.c
+++ b/sessreg.c
@@ -499,6 +499,7 @@ set_utmpx (struct utmpx *u, const char *line, const char *user,
 	static const char letters[] =
 	       "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
 
+	memset (u, 0, sizeof (*u));
 	if (line)
 	{
 		if(strcmp(line, ":0") == 0)
-- 
1.7.9.2



More information about the xorg-devel mailing list