summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--session.c6
2 files changed, 8 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 94b8aa5d..2ad0d32e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -5,6 +5,9 @@
- (djm) Bug #646: Fix location of x11-ssh-askpass; Jim
- (dtucker) [openbsd-compat/port-aix.h] Bug #640: Don't include audit.h
unless required. Reorder to reduce warnings.
+ - (dtucker) [session.c] Bug #643: Fix size_t -> u_int and fix null deref
+ when /etc/default/login doesn't exist or isn't readable. Fixes from
+ jparsons-lists at saffron.net and georg.oppenberg at deu mci com.
20030918
- (djm) Bug #652: Fix empty password auth
@@ -1126,4 +1129,4 @@
- Fix sshd BindAddress and -b options for systems using fake-getaddrinfo.
Report from murple@murple.net, diagnosis from dtucker@zip.com.au
-$Id: ChangeLog,v 1.2994.2.11 2003/09/19 10:46:21 dtucker Exp $
+$Id: ChangeLog,v 1.2994.2.12 2003/09/19 10:55:10 dtucker Exp $
diff --git a/session.c b/session.c
index 4497f5c0..616fee97 100644
--- a/session.c
+++ b/session.c
@@ -912,8 +912,7 @@ static void
read_etc_default_login(char ***env, u_int *envsize, uid_t uid)
{
char **tmpenv = NULL, *var;
- u_int i;
- size_t tmpenvsize = 0;
+ u_int i, tmpenvsize = 0;
mode_t mask;
/*
@@ -923,6 +922,9 @@ read_etc_default_login(char ***env, u_int *envsize, uid_t uid)
*/
read_environment_file(&tmpenv, &tmpenvsize, "/etc/default/login");
+ if (tmpenv == NULL)
+ return;
+
if (uid == 0)
var = child_get_env(tmpenv, "SUPATH");
else