com php-src: fix uninitialized args usage: ext/xsl/xsltprocessor.c
| From: | Anatol Belski | Date: | Tue, 19 Aug 2014 10:50:27 +0000 |
| Subject: | com php-src: fix uninitialized args usage: ext/xsl/xsltprocessor.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-80610@lists.php.net to get a copy of this message | ||
Commit: fa0cca85e5b8bbfe8880d6537f0d6b9a565e76c1
Author: Anatol Belski <ab@php.net> Tue, 19 Aug 2014 12:50:27 +0200
Parents: 6070757c77a226fecce5f2d029084cf68c979762
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=fa0cca85e5b8bbfe8880d6537f0d6b9a565e76c1
Log:
fix uninitialized args usage
Changed paths:
M ext/xsl/xsltprocessor.c
Diff:
diff --git a/ext/xsl/xsltprocessor.c b/ext/xsl/xsltprocessor.c
index af01da1..100d167 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) {