Fix bug #71540 - NULL pointer dereference in xsl_ext_function_php()

This commit is contained in:
Stanislav Malyshev 2016-02-14 23:35:29 -08:00
parent e18910c296
commit 889e3b62f4
2 changed files with 71 additions and 0 deletions

View file

@ -231,6 +231,10 @@ static void xsl_ext_function_php(xmlXPathParserContextPtr ctxt, int nargs, int t
/* Reverse order to pop values off ctxt stack */
for (i = nargs - 2; i >= 0; i--) {
obj = valuePop(ctxt);
if (obj == NULL) {
ZVAL_NULL(&args[i]);
continue;
}
switch (obj->type) {
case XPATH_STRING:
ZVAL_STRING(&args[i], (char *)obj->stringval);