From f92e5c37316fc6b59bb3937e0576a610809ae567 Mon Sep 17 00:00:00 2001 From: Theo de Raadt Date: Sat, 6 Jul 2002 00:10:37 +0000 Subject: cope better if realloc fails; better fix than cloder@acm.org --- lib/libc/gen/getpwent.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib/libc') diff --git a/lib/libc/gen/getpwent.c b/lib/libc/gen/getpwent.c index f82e8b5f689..036a35c7f4b 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.25 2002/05/24 21:22:37 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: getpwent.c,v 1.26 2002/07/06 00:10:36 deraadt Exp $"; #endif /* LIBC_SCCS and not lint */ #include @@ -1002,6 +1002,7 @@ __hashpw(key) if (line) free(line); line = NULL; + max = 0; return 0; } line = nline; -- cgit v1.2.3