diff options
author | jkh <jkh@FreeBSD.org> | 1997-01-22 18:36:27 +0000 |
---|---|---|
committer | jkh <jkh@FreeBSD.org> | 1997-01-22 18:36:27 +0000 |
commit | 65e0bbf66b7d3fce19e621d1eecd4364ea1057ea (patch) | |
tree | 9c813c67ceb5ce5b3a92c183d989170af9161f80 /usr.bin/login/login.c | |
parent | e6557b5a6ecd86e6f23f1e5ab3bb562dd5a0f205 (diff) | |
download | FreeBSD-src-65e0bbf66b7d3fce19e621d1eecd4364ea1057ea.zip FreeBSD-src-65e0bbf66b7d3fce19e621d1eecd4364ea1057ea.tar.gz |
Don't dereference NULL pwd on non-existant username (I wonder how long
THAT has been in here!).
Diffstat (limited to 'usr.bin/login/login.c')
-rw-r--r-- | usr.bin/login/login.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.bin/login/login.c b/usr.bin/login/login.c index a02a86d..affb3c5 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)); |