From eef44c609bdc848c510d159e15561c9bd7ce42c0 Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Fri, 9 Dec 2005 15:29:15 +0000 Subject: Fixed possible SIGSEGV (Rob Richards) --- ext/soap/php_schema.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'ext/soap/php_schema.c') 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); -- cgit v1.2.1