andrei          Mon Oct  7 13:16:24 2002 EDT

  Modified files:              
    /php4/ext/pcre      php_pcre.c 
  Log:
  Use a copy of locale instead of the original. Fixes bug #19482.
  
  
Index: php4/ext/pcre/php_pcre.c
diff -u php4/ext/pcre/php_pcre.c:1.128 php4/ext/pcre/php_pcre.c:1.129
--- php4/ext/pcre/php_pcre.c:1.128      Wed Sep 11 10:41:25 2002
+++ php4/ext/pcre/php_pcre.c    Mon Oct  7 13:16:23 2002
@@ -16,7 +16,7 @@
    +----------------------------------------------------------------------+
  */
 
-/* $Id: php_pcre.c,v 1.128 2002/09/11 14:41:25 andrei Exp $ */
+/* $Id: php_pcre.c,v 1.129 2002/10/07 17:16:23 andrei Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -66,6 +66,7 @@
        pefree(pce->re, 1);
 #if HAVE_SETLOCALE
        if ((void*)pce->tables) pefree((void*)pce->tables, 1);
+       pefree(pce->locale, 1);
 #endif
 }
 
@@ -302,7 +303,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,



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to