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:
83781e4
)
getpass: s/sizeof(buf)-1/sizeof(buf)/ in fgets
author
Denys Vlasenko
<vda.linux@googlemail.com>
Sun, 1 Jan 2012 16:31:40 +0000
(17:31 +0100)
committer
Denys Vlasenko
<vda.linux@googlemail.com>
Sun, 1 Jan 2012 16:31:40 +0000
(17:31 +0100)
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
libc/unistd/getpass.c
patch
|
blob
|
history
diff --git
a/libc/unistd/getpass.c
b/libc/unistd/getpass.c
index
dd927ab
..
c311a15
100644
(file)
--- a/
libc/unistd/getpass.c
+++ b/
libc/unistd/getpass.c
@@
-75,7
+75,7
@@
char * getpass (const char *prompt)
fflush(out);
/* Read the password. */
- if (!fgets (buf, sizeof(buf)
-1
, in))
+ if (!fgets (buf, sizeof(buf), in))
buf[0] = '\0';
nread = strlen(buf);
if (nread > 0 && buf[nread - 1] == '\n')