diff options
author | 2000-01-08 08:07:24 +0000 | |
---|---|---|
committer | 2000-01-08 08:07:24 +0000 | |
commit | 1981a317a3323bf500c7806a7c387404deccd87b (patch) | |
tree | 87c648cff1f2d68da8db6f47c578b408ad969d84 | |
parent | test getgrent stuff (diff) | |
download | wireguard-openbsd-1981a317a3323bf500c7806a7c387404deccd87b.tar.xz wireguard-openbsd-1981a317a3323bf500c7806a7c387404deccd87b.zip |
fix sizeof's when aliasing reentrant structures.
(this caused group name lookups to fail)
-rw-r--r-- | lib/libc/gen/getgrent.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libc/gen/getgrent.c b/lib/libc/gen/getgrent.c index cfd5d1e44de..609e7fe7d08 100644 --- a/lib/libc/gen/getgrent.c +++ b/lib/libc/gen/getgrent.c @@ -33,7 +33,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char rcsid[] = "$OpenBSD: getgrent.c,v 1.11 2000/01/06 08:19:48 d Exp $"; +static char rcsid[] = "$OpenBSD: getgrent.c,v 1.12 2000/01/08 08:07:24 d Exp $"; #endif /* LIBC_SCCS and not lint */ #include <sys/types.h> @@ -308,7 +308,7 @@ grscan(search, gid, name, p_gr) goto parse; } #endif - if (!fgets(line, sizeof(line), _gr_fp)) + if (!fgets(line, sizeof(gs->line), _gr_fp)) return(0); bp = line; /* skip lines that are too big */ |