summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJun-ichiro itojun Hagino <itojun@cvs.openbsd.org>2002-12-31 02:29:18 +0000
committerJun-ichiro itojun Hagino <itojun@cvs.openbsd.org>2002-12-31 02:29:18 +0000
commit0ad0078865f5403ae40163b31034a1996a11fb23 (patch)
tree2cea7692480f11ec09a3eeb7feb787695f1c7c12
parentf762c670e490925232d775d8e1c44d021c973d05 (diff)
If we're going to replace strtok() with strtok_r(), and the caller of the
latter is invoked recursively, use static (instead of automatic) storage for the "last" pointer so that we remember where we're up to ... Fixes bug with hosts.deny rules such as "rpcbind: ALL EXCEPT some.domain". netbsd lib/libwrap/hosts_access.c 1.17
-rw-r--r--lib/libwrap/hosts_access.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/libwrap/hosts_access.c b/lib/libwrap/hosts_access.c
index f172cffbc0e..6362ed7ccc9 100644
--- a/lib/libwrap/hosts_access.c
+++ b/lib/libwrap/hosts_access.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: hosts_access.c,v 1.9 2002/06/22 02:13:12 deraadt Exp $ */
+/* $OpenBSD: hosts_access.c,v 1.10 2002/12/31 02:29:17 itojun Exp $ */
/*
* This module implements a simple access control language that is based on
@@ -23,7 +23,7 @@
#if 0
static char sccsid[] = "@(#) hosts_access.c 1.21 97/02/12 02:13:22";
#else
-static char rcsid[] = "$OpenBSD: hosts_access.c,v 1.9 2002/06/22 02:13:12 deraadt Exp $";
+static char rcsid[] = "$OpenBSD: hosts_access.c,v 1.10 2002/12/31 02:29:17 itojun Exp $";
#endif
#endif
@@ -199,7 +199,8 @@ char *list;
struct request_info *request;
int (*match_fn)(char *, struct request_info *);
{
- char *tok, *last;
+ char *tok;
+ static char *last;
int l;
/*