diff options
author | 2001-02-13 14:51:08 +0000 | |
---|---|---|
committer | 2001-02-13 14:51:08 +0000 | |
commit | eeafd48991b8237b6e27ae79a0c7571457091613 (patch) | |
tree | f7446226ecad18fdc73ac324c32bb0bfcb9021ad | |
parent | default more wscons options (diff) | |
download | wireguard-openbsd-eeafd48991b8237b6e27ae79a0c7571457091613.tar.xz wireguard-openbsd-eeafd48991b8237b6e27ae79a0c7571457091613.zip |
Avoid theoretical potential buffer overflow
-rw-r--r-- | lib/libc/gen/getpwent.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libc/gen/getpwent.c b/lib/libc/gen/getpwent.c index ce0d3734c4d..50c692014da 100644 --- a/lib/libc/gen/getpwent.c +++ b/lib/libc/gen/getpwent.c @@ -33,7 +33,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char rcsid[] = "$OpenBSD: getpwent.c,v 1.20 2001/01/31 17:42:25 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: getpwent.c,v 1.21 2001/02/13 14:51:08 pjanzen Exp $"; #endif /* LIBC_SCCS and not lint */ #include <sys/param.h> @@ -495,7 +495,7 @@ __has_yppw() DBT key, data; DBT pkey, pdata; int len; - char bf[_PW_NAME_LEN]; + char bf[_PW_NAME_LEN + 1]; key.data = (u_char *)_PW_YPTOKEN; key.size = strlen(_PW_YPTOKEN); |