From fa0cca85e5b8bbfe8880d6537f0d6b9a565e76c1 Mon Sep 17 00:00:00 2001 From: Anatol Belski Date: Tue, 19 Aug 2014 12:50:27 +0200 Subject: [PATCH] fix uninitialized args usage --- ext/xsl/xsltprocessor.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/ext/xsl/xsltprocessor.c b/ext/xsl/xsltprocessor.c index af01da1513..100d167138 100644 --- a/ext/xsl/xsltprocessor.c +++ b/ext/xsl/xsltprocessor.c @@ -292,7 +292,12 @@ static void xsl_ext_function_php(xmlXPathParserContextPtr ctxt, int nargs, int t fci.size = sizeof(fci); fci.function_table = EG(function_table); - fci.params = args; + if (fci.param_count > 0) { + fci.params = args; + } else { + fci.params = NULL; + } + obj = valuePop(ctxt); if (obj->stringval == NULL) { -- 2.40.0