summaryrefslogtreecommitdiff
path: root/ext/soap/php_schema.c
diff options
context:
space:
mode:
authorDmitry Stogov <dmitry@php.net>2005-12-09 15:29:15 +0000
committerDmitry Stogov <dmitry@php.net>2005-12-09 15:29:15 +0000
commiteef44c609bdc848c510d159e15561c9bd7ce42c0 (patch)
treefa13e1356ade356affbf8557aae01c980ef7517c /ext/soap/php_schema.c
parent4ccdc865619fe744d55cc7789b25e8260a2de99d (diff)
downloadphp-git-eef44c609bdc848c510d159e15561c9bd7ce42c0.tar.gz
Fixed possible SIGSEGV (Rob Richards)
Diffstat (limited to 'ext/soap/php_schema.c')
-rw-r--r--ext/soap/php_schema.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/ext/soap/php_schema.c b/ext/soap/php_schema.c
index 565a7fb46b..0e6fb57a5b 100644
--- a/ext/soap/php_schema.c
+++ b/ext/soap/php_schema.c
@@ -232,7 +232,11 @@ int load_schema(sdlCtx *ctx, xmlNodePtr schema TSRMLS_DC)
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);