[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[PATCH 1/4] pam_access: Avoid unitialized usage of line if (errno == ENOENT)



---
 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


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]