diff options
Diffstat (limited to 'usr.sbin/pw/pwupd.c')
-rw-r--r-- | usr.sbin/pw/pwupd.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/usr.sbin/pw/pwupd.c b/usr.sbin/pw/pwupd.c index 1f0d86f..fef3662 100644 --- a/usr.sbin/pw/pwupd.c +++ b/usr.sbin/pw/pwupd.c @@ -155,7 +155,7 @@ pw_update(struct passwd * pwd, char const * user, int mode) char pwbuf[PWBUFSZ]; int l = snprintf(pfx, PWBUFSZ, "%s:", user); #ifdef HAVE_PWDB_U - int isrename = strcmp(user, pwd->pw_name); + int isrename = pwd!=NULL && strcmp(user, pwd->pw_name); #endif /* |