]> granicus.if.org Git - php/commitdiff
Fixed bug #30182 (SOAP module processing WSDL file dumps core).
authorDmitry Stogov <dmitry@php.net>
Wed, 22 Sep 2004 05:57:36 +0000 (05:57 +0000)
committerDmitry Stogov <dmitry@php.net>
Wed, 22 Sep 2004 05:57:36 +0000 (05:57 +0000)
NEWS
ext/soap/php_sdl.c

diff --git a/NEWS b/NEWS
index 5b440fd07403b0e59ab16e8be83a77f1a86ca910..a9c8d9dc095251bdd099f34379bcee8bd1c71ca1 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -14,6 +14,7 @@ PHP                                                                        NEWS
 - Renamed SoapClient->__call() to SoapClinet->__soapCall(). (Dmitry)
 - Fixed bug with raw_post_data not getting set (Brian)
 - Fixed a file-descriptor leak with phpinfo() and other 'special' URLs (Zeev)
+- Fixed bug #30182 (SOAP module processing WSDL file dumps core). (Dmitry)
 - Fixed bug #30045 (Cannot pass big integers (> 2147483647) in SOAP requests).
   (Dmitry)
 - Fixed bug #29985 (unserialize()/ __PHP_Incomplete_class does not report 
index 05237969bc9beb5c7420456a8a96a1f14b8e5f92..0d4695f357e4148f3cae213583a5b46bef44c243 100644 (file)
@@ -2168,13 +2168,14 @@ sdlPtr get_sdl(char *uri TSRMLS_DC)
 {
        sdlPtr sdl = NULL;
        char* old_error_code = SOAP_GLOBAL(error_code);
+       int uri_len;
 
        SOAP_GLOBAL(error_code) = "WSDL";
 
-       if (SOAP_GLOBAL(cache_enabled)) {
+       if (SOAP_GLOBAL(cache_enabled) && ((uri_len = strlen(uri)) < MAXPATHLEN)) {
                char  fn[MAXPATHLEN];
 
-               if (strchr(uri,':') != NULL || IS_ABSOLUTE_PATH(uri,strlen(uri))) {
+               if (strchr(uri,':') != NULL || IS_ABSOLUTE_PATH(uri, uri_len)) {
                        strcpy(fn, uri);
                } else if (VCWD_REALPATH(uri, fn) == NULL) {
                        sdl = load_wsdl(uri);