From: Rob Richards Date: Sun, 5 Oct 2003 13:14:21 +0000 (+0000) Subject: fix segfault if xpath expression string is invalid X-Git-Tag: RELEASE_1_3b3~126 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8f489130bf0bf9491828fc25ff6dbaac3d151694;p=php fix segfault if xpath expression string is invalid --- diff --git a/ext/dom/xpath.c b/ext/dom/xpath.c index 90fcda2e64..0bc17ad57f 100644 --- a/ext/dom/xpath.c +++ b/ext/dom/xpath.c @@ -197,6 +197,9 @@ PHP_FUNCTION(dom_xpath_query) ctxp->nsNr = 0; } + if (! xpathobjp) { + RETURN_FALSE; + } if (xpathobjp->type == XPATH_NODESET) { int i; xmlNodeSetPtr nodesetp;