[imp] Apache segfault FIXED!

sf speedfreak50@netscape.net
Mon Oct 7 20:11:27 PDT 2002


The PHP guys have posted a fix for the segfault related to the pcre code.  Here's a patch relative to php-4.2.3.  I'm still testing this on a Redhat/Apache/PHP box (7.3/1.3.26/4.2.3) box and so far it looks good.  

A great big THANK YOU to the PHP guys and Amith for fixing this!!!

---------------------
Patch relative to 4.2.3 - use patch -p0 < [patch] from php source dir
---------------------
diff -ru ext/pcre/php_pcre.c ext/pcre.new/php_pcre.c
--- ext/pcre/php_pcre.c Thu Feb 28 03:26:35 2002
+++ ext/pcre.new/php_pcre.c     Mon Oct  7 14:27:37 2002
@@ -64,6 +64,7 @@
        pefree(pce->re, 1);
 #if HAVE_SETLOCALE
        if ((void*)pce->tables) pefree((void*)pce->tables, 1);
+       pefree(pce->locale, 1);
 #endif
 }

@@ -298,7 +299,7 @@
        new_entry.extra = *extra;
        new_entry.preg_options = poptions;
 #if HAVE_SETLOCALE
-       new_entry.locale = locale;
+       new_entry.locale = pestrdup(locale, 1);
        new_entry.tables = tables;
 #endif
        zend_hash_update(&PCRE_G(pcre_cache), regex, regex_len+1, (void *)&new_entry,


__________________________________________________________________
The NEW Netscape 7.0 browser is now available. Upgrade now! http://channels.netscape.com/ns/browsers/download.jsp 

Get your own FREE, personal Netscape Mail account today at http://webmail.netscape.com/


More information about the imp mailing list