[PATCH 1/4] pam_access: Avoid unitialized usage of line if (errno == ENOENT)
Robin Hack
rhack at redhat.com
Wed Aug 13 12:26:01 UTC 2014
---
modules/pam_access/pam_access.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/modules/pam_access/pam_access.c b/modules/pam_access/pam_access.c
index 87626e7..266e685 100644
--- a/modules/pam_access/pam_access.c
+++ b/modules/pam_access/pam_access.c
@@ -341,6 +341,9 @@ login_access (pam_handle_t *pamh, struct login_info *item)
int lineno = 0; /* for diagnostics */
char *sptr;
+ /* Avoid unitialized use */
+ memset(line, 0, BUFSIZ);
+
if (item->debug)
pam_syslog (pamh, LOG_DEBUG,
"login_access: user=%s, from=%s, file=%s",
--
1.9.3
More information about the Pam-list
mailing list