summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>1999-10-29 13:09:40 +1000
committerDamien Miller <djm@mindrot.org>1999-10-29 13:09:40 +1000
commitd0562b3cdc06c62ef54bc01870e3b642604f60be (patch)
tree91cfd87a0e5cea0cae6ab6effc77abb365d647de
parent65b3c13132633189b49bf0d7002b55755280d6d3 (diff)
Fix off by one error in PAM env patchV_1_2_PRE6
Tidy changelog
-rw-r--r--ChangeLog2
-rw-r--r--sshd.c4
2 files changed, 4 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 04a5f7d8..02eeb8ac 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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.
diff --git a/sshd.c b/sshd.c
index 028c495f..a4af9e2a 100644
--- a/sshd.c
+++ b/sshd.c
@@ -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));