diff options
author | Dmitry Stogov <dmitry@php.net> | 2004-02-16 09:56:30 +0000 |
---|---|---|
committer | Dmitry Stogov <dmitry@php.net> | 2004-02-16 09:56:30 +0000 |
commit | 6aad56d4a224a15e7ad4fde337c7e04a9cd4863e (patch) | |
tree | 22891e7285940e5e20fafc25d628f146184eaf3e /ext/soap/php_http.c | |
parent | 6e06620089fc5f5970a082a313e31b36f55e7a12 (diff) | |
download | php-git-6aad56d4a224a15e7ad4fde337c7e04a9cd4863e.tar.gz |
fix: prevent of possible crash
Diffstat (limited to 'ext/soap/php_http.c')
-rw-r--r-- | ext/soap/php_http.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/soap/php_http.c b/ext/soap/php_http.c index 8c8d24e55f..df6355d240 100644 --- a/ext/soap/php_http.c +++ b/ext/soap/php_http.c @@ -224,9 +224,9 @@ int send_http_soap_request(zval *this_ptr, xmlDoc *doc, char *location, char *so } use_ssl = 0; - if (strcmp(phpurl->scheme, "https") == 0) { + if (phpurl->scheme != NULL && strcmp(phpurl->scheme, "https") == 0) { use_ssl = 1; - } else if (strcmp(phpurl->scheme, "http") != 0) { + } else if (phpurl->scheme == NULL || strcmp(phpurl->scheme, "http") != 0) { xmlFree(buf); php_url_free(phpurl); add_soap_fault(this_ptr, "HTTP", "Unknown protocol. Only http and https are allowed.", NULL, NULL TSRMLS_CC); |