httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jens-Uwe Mager <...@helios.de>
Subject Re: [PATCH] Expat patch #3
Date Fri, 21 May 1999 11:03:07 GMT
On Fri, May 21, 1999 at 12:49:27PM +0200, Ralf S. Engelschall wrote:

> That's the onl safe way. The same has to be done for
> the regex lib since years!

Oh, I had this patch lying around for a while, this fixes the
segfault if you use mod_rewrite and others as a DSO under AIX.

Index: apache_1.3.6/src/include/alloc.h
===================================================================
--- apache_1.3.6/src/include/alloc.h.orig	Thu Apr 15 16:43:08 1999
+++ apache_1.3.6/src/include/alloc.h	Thu Apr 15 16:44:03 1999
@@ -308,6 +308,9 @@
 
 API_EXPORT(regex_t *) ap_pregcomp(pool *p, const char *pattern, int cflags);
 API_EXPORT(void) ap_pregfree(pool *p, regex_t * reg);
+API_EXPORT(int) ap_regexec(const regex_t *preg, const char *string,
+	size_t nmatch, regmatch_t pmatch[], int eflags);
+#define regexec	ap_regexec
 
 /* routines to note closes... file descriptors are constrained enough
  * on some systems that we want to support this.
Index: apache_1.3.6/src/main/alloc.c
===================================================================
--- apache_1.3.6/src/main/alloc.c.orig	Sun Mar  7 15:05:34 1999
+++ apache_1.3.6/src/main/alloc.c	Thu Apr 15 16:44:29 1999
@@ -1981,6 +1981,13 @@
     ap_unblock_alarms();
 }
 
+API_EXPORT(int) ap_regexec(const regex_t *preg, const char *string,
+	size_t nmatch, regmatch_t pmatch[], int eflags)
+{
+#undef regexec
+	return regexec(preg, string, nmatch, pmatch, eflags);
+}
+
 /*****************************************************************
  *
  * More grotty system stuff... subprocesses.  Frump.  These don't use
Index: apache_1.3.6/src/support/httpd.exp
===================================================================
--- apache_1.3.6/src/support/httpd.exp.orig	Thu Apr 15 16:45:15 1999
+++ apache_1.3.6/src/support/httpd.exp	Thu Apr 15 16:46:04 1999
@@ -249,6 +249,7 @@
 ap_rationalize_mtime
 ap_read_config
 ap_read_request
+ap_regexec
 ap_register_cleanup
 ap_register_other_child
 ap_remove_module

-- 
Jens-Uwe Mager

HELIOS Software GmbH
Steinriede 3
30827 Garbsen
Germany

Phone:		+49 5131 709320
FAX:		+49 5131 709325
Internet:	jum@helios.de

Mime
View raw message