summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2014-11-03 20:04:31 -0800
committerAlan Coopersmith <alan.coopersmith@oracle.com>2014-11-03 20:04:31 -0800
commit0a234ecc502b3e08d8f81d51fb724d97e8045504 (patch)
treed5ab93df61ae11c898b93137f65c95b7f98440f7
parent1dacc4b5554f794f8219356a0d2bd2dc6a499160 (diff)
Zero initialize struct utmpx, as we already do for struct utmp
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-rw-r--r--sessreg.c1
1 files changed, 1 insertions, 0 deletions
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)