summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitry Stogov <dmitry@php.net>2005-12-09 15:29:28 +0000
committerDmitry Stogov <dmitry@php.net>2005-12-09 15:29:28 +0000
commitfd10ad58970dca16bfbed82c76bf24f892cbd2dd (patch)
tree5da7ce98f3b80a4d72a29f3142043c75492a0033
parent1c08413cb7e6d2e1ccdbcf9c28cf0295351f8dd9 (diff)
downloadphp-git-fd10ad58970dca16bfbed82c76bf24f892cbd2dd.tar.gz
Fixed possible SIGSEGV (Rob Richards)
-rw-r--r--ext/soap/php_encoding.c2
-rw-r--r--ext/soap/php_schema.c6
-rw-r--r--ext/soap/php_sdl.c8
-rw-r--r--ext/soap/soap.c4
4 files changed, 12 insertions, 8 deletions
diff --git a/ext/soap/php_encoding.c b/ext/soap/php_encoding.c
index d31653f573..9bdf284c8b 100644
--- a/ext/soap/php_encoding.c
+++ b/ext/soap/php_encoding.c
@@ -265,7 +265,7 @@ xmlNodePtr master_to_xml(encodePtr encode, zval *data, int style, xmlNodePtr par
if (zend_hash_find(ht, "enc_ns", sizeof("enc_ns"), (void **)&zns) == SUCCESS) {
enc = get_encoder(SOAP_GLOBAL(sdl), Z_STRVAL_PP(zns), Z_STRVAL_PP(zstype));
} else {
- enc = get_encoder(SOAP_GLOBAL(sdl), NULL, Z_STRVAL_PP(zstype));
+ enc = get_encoder_ex(SOAP_GLOBAL(sdl), Z_STRVAL_PP(zstype), Z_STRLEN_PP(zstype));
}
}
}
diff --git a/ext/soap/php_schema.c b/ext/soap/php_schema.c
index a953b1e75e..afa0f34b67 100644
--- a/ext/soap/php_schema.c
+++ b/ext/soap/php_schema.c
@@ -232,7 +232,11 @@ int load_schema(sdlCtx *ctx,xmlNodePtr schema)
location = get_attribute(trav->properties, "schemaLocation");
if (ns != NULL && tns != NULL && strcmp(ns->children->content,tns->children->content) == 0) {
- soap_error1(E_ERROR, "Parsing Schema: can't import schema from '%s', namespace must not match the enclosing schema 'targetNamespace'", location->children->content);
+ if (location) {
+ soap_error1(E_ERROR, "Parsing Schema: can't import schema from '%s', namespace must not match the enclosing schema 'targetNamespace'", location->children->content);
+ } else {
+ soap_error0(E_ERROR, "Parsing Schema: can't import schema. Namespace must not match the enclosing schema 'targetNamespace'");
+ }
}
if (location) {
xmlChar *base = xmlNodeGetBase(trav->doc, trav);
diff --git a/ext/soap/php_sdl.c b/ext/soap/php_sdl.c
index b87ff8cdf5..f8882d4016 100644
--- a/ext/soap/php_sdl.c
+++ b/ext/soap/php_sdl.c
@@ -410,10 +410,10 @@ static sdlSoapBindingFunctionHeaderPtr wsdl_soap_binding_header(sdlCtx* ctx, xml
if (!h->ns && h->element->namens) {
h->ns = estrdup(h->element->namens);
}
- }
- if (h->element->name) {
- efree(h->name);
- h->name = estrdup(h->element->name);
+ if (h->element->name) {
+ efree(h->name);
+ h->name = estrdup(h->element->name);
+ }
}
}
}
diff --git a/ext/soap/soap.c b/ext/soap/soap.c
index 9ec14713e5..5f76c81652 100644
--- a/ext/soap/soap.c
+++ b/ext/soap/soap.c
@@ -1797,8 +1797,8 @@ fail:
/* }}} */
-/* {{{ proto SoapServer::fault
- SoapServer::fault */
+/* {{{ proto SoapServer::fault ( staring code, string string [, string actor [, mixed details [, string name]]] )
+ Issue SoapFault indicating an error */
PHP_METHOD(SoapServer, fault)
{
char *code, *string, *actor=NULL, *name=NULL;