1
0
Fork 0
mirror of git://git.code.sf.net/p/cdesktopenv/code synced 2025-02-15 04:32:24 +00:00

dtsession/SmLock: potential null deref (CID 87561, 87957, 88181)

This commit is contained in:
Jon Trulson 2014-12-27 16:06:23 -07:00
parent f14df58edb
commit 1bde7d8c5c

View file

@ -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",