diff options
author | Stanislav Malyshev <stas@php.net> | 2016-02-14 23:35:29 -0800 |
---|---|---|
committer | Stanislav Malyshev <stas@php.net> | 2016-02-15 00:09:09 -0800 |
commit | cf0cf5b5074e0bd00c0e3eb948a7420363a41eed (patch) | |
tree | dc2cf8bde2b185bdc4bf2329a1984a15bfd417eb /ext/xsl/xsltprocessor.c | |
parent | 9b277e6cff3a4c9bb4385e9c23f4f926486ffe03 (diff) | |
download | php-git-cf0cf5b5074e0bd00c0e3eb948a7420363a41eed.tar.gz |
Fix bug #71540 - NULL pointer dereference in xsl_ext_function_php()
Diffstat (limited to 'ext/xsl/xsltprocessor.c')
-rw-r--r-- | ext/xsl/xsltprocessor.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/ext/xsl/xsltprocessor.c b/ext/xsl/xsltprocessor.c index be46d38de1..ec3042311d 100644 --- a/ext/xsl/xsltprocessor.c +++ b/ext/xsl/xsltprocessor.c @@ -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); |