diff options
author | Damien Miller <djm@mindrot.org> | 1999-10-29 13:09:40 +1000 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 1999-10-29 13:09:40 +1000 |
commit | d0562b3cdc06c62ef54bc01870e3b642604f60be (patch) | |
tree | 91cfd87a0e5cea0cae6ab6effc77abb365d647de | |
parent | 65b3c13132633189b49bf0d7002b55755280d6d3 (diff) |
Fix off by one error in PAM env patchV_1_2_PRE6
Tidy changelog
-rw-r--r-- | ChangeLog | 2 | ||||
-rw-r--r-- | sshd.c | 4 |
2 files changed, 4 insertions, 2 deletions
@@ -9,6 +9,8 @@ - Removed redundant subdirectories - Integrated part of a patch from Dan Brosemer <odin@linuxfreak.com> for building on Debian. + - Fixed off-by-one error in PAM env patch + - Released 1.2pre6 19991028 - Further PAM enhancements. @@ -18,7 +18,7 @@ agent connections. */ #include "includes.h" -RCSID("$Id: sshd.c,v 1.8 1999/10/29 01:49:20 damien Exp $"); +RCSID("$Id: sshd.c,v 1.9 1999/10/29 03:09:40 damien Exp $"); #include "xmalloc.h" #include "rsa.h" @@ -2365,7 +2365,7 @@ void do_child(const char *command, struct passwd *pw, const char *term, char **pam_env = pam_getenvlist((pam_handle_t *)pamh); for(this_var = 0; pam_env && pam_env[this_var]; this_var++) { - if(strlen(pam_env[this_var]) < sizeof(var_name)) + if(strlen(pam_env[this_var]) < (sizeof(var_name) - 1)) if((equal_sign = strstr(pam_env[this_var], "=")) != NULL) { memset(var_name, 0, sizeof(var_name)); |