From d87e2a2cc503d87ac8bb9521ce793420df4ff279 Mon Sep 17 00:00:00 2001 From: "Jordan K. Hubbard" Date: Wed, 22 Jan 1997 18:36:27 +0000 Subject: [PATCH] Don't dereference NULL pwd on non-existant username (I wonder how long THAT has been in here!). --- usr.bin/login/login.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/usr.bin/login/login.c b/usr.bin/login/login.c index a02a86d51ee..affb3c5bd04 100644 --- a/usr.bin/login/login.c +++ b/usr.bin/login/login.c @@ -417,7 +417,8 @@ main(argc, argv) } #endif /* SKEY */ #else /* !KERBEROS */ - rval = strcmp(ep, pwd->pw_passwd); + if (pwd) + rval = strcmp(ep, pwd->pw_passwd); #endif /* KERBEROS */ /* clear entered password */ memset(p, 0, strlen(p));