]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
(__getlogin_r_loginuid): Also fail if tpwd after pwuid call is NULL.
authorUlrich Drepper <drepper@redhat.com>
Tue, 17 Aug 2010 09:05:30 +0000 (11:05 +0200)
committerAndreas Schwab <schwab@redhat.com>
Tue, 17 Aug 2010 09:06:31 +0000 (11:06 +0200)
(cherry picked from commit c86434ccb576a3ce35b5a74f72b9f03bd45b522a)

ChangeLog
sysdeps/unix/sysv/linux/getlogin_r.c

index 42efab904be70366e1e27109549ae1b359e9f197..31c6a648bb89c14f9759b77b48837073ac458f89 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2010-08-06  Ulrich Drepper  <drepper@redhat.com>
+
+       * sysdeps/unix/sysv/linux/getlogin_r.c (__getlogin_r_loginuid):
+       Also fail if tpwd after pwuid call is NULL.
+
 2010-06-21  Andreas Schwab <schwab@redhat.com>
 
        * sysdeps/unix/sysv/linux/getlogin_r.c (__getlogin_r_loginuid):
index 7d4d6c0ed5018f3382a3e3319faa72bc8d19630f..42041eeee0b01d5a3e1a2a4d9b817dc48481d60b 100644 (file)
@@ -81,7 +81,7 @@ __getlogin_r_loginuid (name, namesize)
        use_malloc = true;
       }
 
-  if (res != 0)
+  if (res != 0 || tpwd == NULL)
     {
       result = -1;
       goto out;