This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libc/11571] getlogin_r (NULL, 0) segfaults


------- 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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]