aboutsummaryrefslogtreecommitdiff
path: root/sysdeps
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2010-08-06 19:18:05 -0700
committerUlrich Drepper <drepper@redhat.com>2010-08-06 19:18:05 -0700
commitc86434ccb576a3ce35b5a74f72b9f03bd45b522a (patch)
tree6c0de98f045d7b4ff70f47b0d1c4d1173baa4d9a /sysdeps
parentfd3ebedafc751998b4596d0277a704c41988d10b (diff)
downloadglibc-c86434ccb576a3ce35b5a74f72b9f03bd45b522a.tar
glibc-c86434ccb576a3ce35b5a74f72b9f03bd45b522a.tar.gz
glibc-c86434ccb576a3ce35b5a74f72b9f03bd45b522a.tar.bz2
glibc-c86434ccb576a3ce35b5a74f72b9f03bd45b522a.zip
(__getlogin_r_loginuid): Also fail if tpwd after pwuid call is NULL.
Diffstat (limited to 'sysdeps')
-rw-r--r--sysdeps/unix/sysv/linux/getlogin_r.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sysdeps/unix/sysv/linux/getlogin_r.c b/sysdeps/unix/sysv/linux/getlogin_r.c
index 7d4d6c0ed5..42041eeee0 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;