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

THAT has been in here!).
This commit is contained in:
jkh 1997-01-22 18:36:27 +00:00
parent e6557b5a6e
commit 65e0bbf66b

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