nlopess         Mon Jan 29 19:36:53 2007 UTC

  Modified files:              
    /php-src/ext/soap   php_xml.c 
  Log:
  fix access to already free'ed memory
  
http://cvs.php.net/viewvc.cgi/php-src/ext/soap/php_xml.c?r1=1.32&r2=1.33&diff_format=u
Index: php-src/ext/soap/php_xml.c
diff -u php-src/ext/soap/php_xml.c:1.32 php-src/ext/soap/php_xml.c:1.33
--- php-src/ext/soap/php_xml.c:1.32     Wed Jan 24 21:43:47 2007
+++ php-src/ext/soap/php_xml.c  Mon Jan 29 19:36:53 2007
@@ -17,7 +17,7 @@
   |          Dmitry Stogov <[EMAIL PROTECTED]>                             |
   +----------------------------------------------------------------------+
 */
-/* $Id: php_xml.c,v 1.32 2007/01/24 21:43:47 pollita Exp $ */
+/* $Id: php_xml.c,v 1.33 2007/01/29 19:36:53 nlopess Exp $ */
 
 #include "php_soap.h"
 #include "libxml/parser.h"
@@ -87,12 +87,17 @@
 */
 
        old_allow_url_fopen_list = PG(allow_url_fopen_list);
-       if (!old_allow_url_fopen_list) {
-               old_allow_url_fopen_list = "";
+       if (old_allow_url_fopen_list) {
+               old_allow_url_fopen_list = estrdup(old_allow_url_fopen_list);
+       } else {
+               old_allow_url_fopen_list = STR_EMPTY_ALLOC();
        }
+
        zend_alter_ini_entry("allow_url_fopen", sizeof("allow_url_fopen"), "*", 
1, PHP_INI_SYSTEM, PHP_INI_STAGE_RUNTIME);
        ctxt = xmlCreateFileParserCtxt(filename);
        zend_alter_ini_entry("allow_url_fopen", sizeof("allow_url_fopen"), 
old_allow_url_fopen_list, strlen(old_allow_url_fopen_list), PHP_INI_SYSTEM, 
PHP_INI_STAGE_RUNTIME);
+       efree(old_allow_url_fopen_list);
+
        if (ctxt) {
                ctxt->keepBlanks = 0;
                ctxt->sax->ignorableWhitespace = soap_ignorableWhitespace;

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

Reply via email to