From: Jon Trulson Date: Sat, 27 Dec 2014 23:06:23 +0000 (-0700) Subject: dtsession/SmLock: potential null deref (CID 87561, 87957, 88181) X-Git-Tag: 2.2.3~60^2~10 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=1bde7d8c5cff8adc1ac9304cc6b0ef92aec74b51;p=oweals%2Fcde.git dtsession/SmLock: potential null deref (CID 87561, 87957, 88181) --- diff --git a/cde/programs/dtsession/SmLock.c b/cde/programs/dtsession/SmLock.c index 25069851..fb45d37c 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",