]> 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>
Sat, 7 Aug 2010 02:18:05 +0000 (19:18 -0700)
committerUlrich Drepper <drepper@redhat.com>
Sat, 7 Aug 2010 02:18:05 +0000 (19:18 -0700)
sysdeps/unix/sysv/linux/getlogin_r.c

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;