]> granicus.if.org Git - php/commitdiff
bug #27810 from Joe Orton
authorRasmus Lerdorf <rasmus@php.net>
Fri, 23 Apr 2004 17:51:39 +0000 (17:51 +0000)
committerRasmus Lerdorf <rasmus@php.net>
Fri, 23 Apr 2004 17:51:39 +0000 (17:51 +0000)
NEWS
ext/pcre/php_pcre.c

diff --git a/NEWS b/NEWS
index 54cc74cbb5fd5784b3942d42261a763468f7faba..5ca911cdc6b8500b5a447021c5cb736f7473d927 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,6 +1,7 @@
 PHP 4                                                                      NEWS
 |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
 ?? ??? 2004, Version 4.3.7
+- Fixed bug #27810 (don't use php's pemalloc in ext/pcre). (Joe Orton)
 - Fixed possible crash inside pg_copy_(to|from) function if delimiter is more
   then 1 character long. (Ilia)
 - Fixed handling of return values from storred procedures in mssql_execute()
index 68ea54b8e9975113aadbe3f8e9501ccc2be94c8d..3bed679a0190044c320ebe1b9cb4adc451a024ed 100644 (file)
 
 ZEND_DECLARE_MODULE_GLOBALS(pcre)
 
-
-static void *php_pcre_malloc(size_t size)
-{
-       return pemalloc(size, 1);
-}
-
-
-static void php_pcre_free(void *ptr)
-{
-       if (ptr)
-       pefree(ptr, 1);
-}
-
-
 static void php_free_pcre_cache(void *data)
 {
        pcre_cache_entry *pce = (pcre_cache_entry *) data;
@@ -107,14 +93,6 @@ static PHP_MINIT_FUNCTION(pcre)
        REGISTER_LONG_CONSTANT("PREG_SPLIT_OFFSET_CAPTURE", PREG_SPLIT_OFFSET_CAPTURE, CONST_CS | CONST_PERSISTENT);
        REGISTER_LONG_CONSTANT("PREG_GREP_INVERT", PREG_GREP_INVERT, CONST_CS | CONST_PERSISTENT);
 
-       pcre_malloc = php_pcre_malloc;
-       pcre_free = php_pcre_free;
-
-#ifdef NO_RECURSE
-       pcre_stack_malloc = php_pcre_malloc;
-       pcre_stack_free = php_pcre_free;
-#endif
-       
        return SUCCESS;
 }
 /* }}} */
@@ -548,7 +526,7 @@ static void php_pcre_match(INTERNAL_FUNCTION_PARAMETERS, int global)
                                        }
                                }
 
-                               php_pcre_free((void *) stringlist);
+                               pcre_free((void *) stringlist);
                        }
                }
                else { /* Failed to match */