OSDN Git Service
(root)
/
uclinux-h8
/
uclibc-ng.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bb9393f
)
Patch from Luc Van Oostenryck to fix a buffer overflow
author
Eric Andersen
<andersen@codepoet.org>
Fri, 15 Nov 2002 09:25:16 +0000
(09:25 -0000)
committer
Eric Andersen
<andersen@codepoet.org>
Fri, 15 Nov 2002 09:25:16 +0000
(09:25 -0000)
in getlogin_r
libc/unistd/getlogin.c
patch
|
blob
|
history
diff --git
a/libc/unistd/getlogin.c
b/libc/unistd/getlogin.c
index
c762c36
..
6db73ae
100644
(file)
--- 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;
}