[PATCH 1/4] pam_access: Avoid unitialized usage of line if (errno == ENOENT)
Robin Hack <[email protected]> Wed, 13 Aug 2014 14:26:01 +0200
| Newsgroups | gmane.linux.pam |
|---|---|
| Message-ID | <[email protected]> |
---
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