From: Ulrich Drepper Date: Tue, 17 Aug 2010 09:05:30 +0000 (+0200) Subject: (__getlogin_r_loginuid): Also fail if tpwd after pwuid call is NULL. X-Git-Tag: glibc-2.12.2~66 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d8d583fc44fbdc7014ae1f684589afd8214e73be;p=thirdparty%2Fglibc.git (__getlogin_r_loginuid): Also fail if tpwd after pwuid call is NULL. (cherry picked from commit c86434ccb576a3ce35b5a74f72b9f03bd45b522a) --- diff --git a/ChangeLog b/ChangeLog index 42efab904be..31c6a648bb8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2010-08-06 Ulrich Drepper + + * sysdeps/unix/sysv/linux/getlogin_r.c (__getlogin_r_loginuid): + Also fail if tpwd after pwuid call is NULL. + 2010-06-21 Andreas Schwab * sysdeps/unix/sysv/linux/getlogin_r.c (__getlogin_r_loginuid): diff --git a/sysdeps/unix/sysv/linux/getlogin_r.c b/sysdeps/unix/sysv/linux/getlogin_r.c index 7d4d6c0ed50..42041eeee0b 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;