diff options
author | Joerg Wunsch <joerg@FreeBSD.org> | 2002-10-29 12:45:32 +0000 |
---|---|---|
committer | Joerg Wunsch <joerg@FreeBSD.org> | 2002-10-29 12:45:32 +0000 |
commit | 313997542e1665f21555249c1cf80f7960c5f946 (patch) | |
tree | 5a212c876d6d1ac30f228a40b066e4981a07a613 /chpass | |
parent | 8376afb86b9309ee1df467ff588713ab83f66337 (diff) | |
download | pw-darwin-313997542e1665f21555249c1cf80f7960c5f946.tar.gz pw-darwin-313997542e1665f21555249c1cf80f7960c5f946.tar.zst pw-darwin-313997542e1665f21555249c1cf80f7960c5f946.zip |
Don't try to dereference a NULL pw pointer. This would happen when
attempting to use chpass -a.
Diffstat (limited to 'chpass')
-rw-r--r-- | chpass/chpass.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/chpass/chpass.c b/chpass/chpass.c index 22ca2ac..ba8baaa 100644 --- a/chpass/chpass.c +++ b/chpass/chpass.c @@ -166,7 +166,7 @@ main(int argc, char *argv[]) } #ifdef YP - if ((pw->pw_fields & _PWF_SOURCE) == _PWF_NIS) { + if (pw != NULL && (pw->pw_fields & _PWF_SOURCE) == _PWF_NIS) { ypclnt = ypclnt_new(yp_domain, "passwd.byname", yp_host); master_mode = (ypclnt != NULL && ypclnt_connect(ypclnt) != -1 && |