Don't dereference NULL pwd on non-existant username (I wonder how long

THAT has been in here!).
This commit is contained in:
Jordan K. Hubbard 1997-01-22 18:36:27 +00:00
parent 5ea6dc36ff
commit d87e2a2cc5
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=21950

View file

@ -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));