summaryrefslogtreecommitdiff
path: root/lib/libc
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2002-07-06 00:10:37 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2002-07-06 00:10:37 +0000
commitf92e5c37316fc6b59bb3937e0576a610809ae567 (patch)
tree7c5f3ec4e0cc17f090ce5bb81724998a5c3647f6 /lib/libc
parent1708021ff9109001a4f0c79c7d80d49f9d3954ba (diff)
cope better if realloc fails; better fix than cloder@acm.org
Diffstat (limited to 'lib/libc')
-rw-r--r--lib/libc/gen/getpwent.c3
1 files changed, 2 insertions, 1 deletions
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 <sys/param.h>
@@ -1002,6 +1002,7 @@ __hashpw(key)
if (line)
free(line);
line = NULL;
+ max = 0;
return 0;
}
line = nline;