diff --git a/cde/programs/dtsession/SmLock.c b/cde/programs/dtsession/SmLock.c index 25069851e..fb45d37c8 100644 --- a/cde/programs/dtsession/SmLock.c +++ b/cde/programs/dtsession/SmLock.c @@ -162,7 +162,8 @@ static Boolean CanReAuthenticate(char *name, uid_t uid, char *passwd, Boolean fail = False; *pwent = (name == NULL) ? getpwuid(uid) : getpwnam(name); - *spent = getspnam((*pwent)->pw_name); + if (pwent) + *spent = getspnam((*pwent)->pw_name); #ifdef JET_AUTHDEBUG fprintf(stderr, "CanReAuthenticate(): %s %s %s\n",