diff options
author | Eric Andersen <andersen@codepoet.org> | 2002-11-15 09:25:16 +0000 |
---|---|---|
committer | Eric Andersen <andersen@codepoet.org> | 2002-11-15 09:25:16 +0000 |
commit | 944d7f249baa4a3661f138fd61e0a5e1fe3b1dd8 (patch) | |
tree | f7d458ac59aeb7f020376af18662c41891cb689b /libc | |
parent | bb9393fa99f96a086572d2332e6ac8283b8fe954 (diff) |
Patch from Luc Van Oostenryck to fix a buffer overflow
in getlogin_r
Diffstat (limited to 'libc')
-rw-r--r-- | libc/unistd/getlogin.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libc/unistd/getlogin.c b/libc/unistd/getlogin.c index c762c366e..6db73ae1c 100644 --- a/libc/unistd/getlogin.c +++ b/libc/unistd/getlogin.c @@ -42,7 +42,7 @@ int getlogin_r(char *name, size_t len) return -1; strncpy(name, foo, len); - name[len] = '\0'; + name[len-1] = '\0'; return 0; } |