projects
/
kopensolaris-gnu
/
glibc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
fdecb5a
)
(__fgetpwent_r): Correct buffer overflow fix.
author
drepper
<drepper>
Mon, 8 Jun 1998 09:57:00 +0000
(09:57 +0000)
committer
drepper
<drepper>
Mon, 8 Jun 1998 09:57:00 +0000
(09:57 +0000)
pwd/fgetpwent_r.c
patch
|
blob
|
history
diff --git
a/pwd/fgetpwent_r.c
b/pwd/fgetpwent_r.c
index
534afd5
..
87ea1de
100644
(file)
--- a/
pwd/fgetpwent_r.c
+++ b/
pwd/fgetpwent_r.c
@@
-74,14
+74,14
@@
__fgetpwent_r (FILE *stream, struct passwd *resbuf, char *buffer,
do
{
- buffer[buflen] = '\xff';
+ buffer[buflen
- 1
] = '\xff';
p = fgets (buffer, buflen, stream);
if (p == NULL && feof (stream))
{
*result = NULL;
return errno;
}
- if (p == NULL || buffer[buflen] != '\xff')
+ if (p == NULL || buffer[buflen
- 1
] != '\xff')
{
*result = NULL;
return errno = ERANGE;