This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug libc/11571] getlogin_r (NULL, 0) segfaults
- From: "rjones at redhat dot com" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sources dot redhat dot com
- Date: 5 May 2010 16:08:44 -0000
- Subject: [Bug libc/11571] getlogin_r (NULL, 0) segfaults
- References: <20100505160124.11571.rjones@redhat.com>
- Reply-to: sourceware-bugzilla at sourceware dot org
------- Additional Comments From rjones at redhat dot com 2010-05-05 16:08 -------
Problem is:
getlogin_r.c:84 strncpy (name, pwd.pw_name, namesize - 1);
http://sourceware.org/git/?
p=glibc.git;a=blob;f=sysdeps/unix/sysv/linux/getlogin_r.c;h=d9c66fe2598fb9dbc0fe1a6577f5db420598
0392;hb=HEAD#l84
namesize == 0, so it calls strncpy with -1 as the 3rd parameter.
--
http://sourceware.org/bugzilla/show_bug.cgi?id=11571
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.