From: Ulrich Drepper Date: Sat, 7 Aug 2010 02:18:05 +0000 (-0700) Subject: (__getlogin_r_loginuid): Also fail if tpwd after pwuid call is NULL. X-Git-Tag: upstream/2.30~12747 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c86434ccb576a3ce35b5a74f72b9f03bd45b522a;p=external%2Fglibc.git (__getlogin_r_loginuid): Also fail if tpwd after pwuid call is NULL. --- diff --git a/sysdeps/unix/sysv/linux/getlogin_r.c b/sysdeps/unix/sysv/linux/getlogin_r.c index 7d4d6c0..42041ee 100644 --- a/sysdeps/unix/sysv/linux/getlogin_r.c +++ b/sysdeps/unix/sysv/linux/getlogin_r.c @@ -81,7 +81,7 @@ __getlogin_r_loginuid (name, namesize) use_malloc = true; } - if (res != 0) + if (res != 0 || tpwd == NULL) { result = -1; goto out;