]> granicus.if.org Git - php/commitdiff
fix uninitialized args usage
authorAnatol Belski <ab@php.net>
Tue, 19 Aug 2014 10:50:27 +0000 (12:50 +0200)
committerAnatol Belski <ab@php.net>
Tue, 19 Aug 2014 10:50:27 +0000 (12:50 +0200)
ext/xsl/xsltprocessor.c

index af01da1513d62f127b1fcc354f796a5dca001117..100d1671380bc974e1e22549d950ed20441c4575 100644 (file)
@@ -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) {