diff options
author | Pierre Joye <pajoye@php.net> | 2010-11-18 15:22:22 +0000 |
---|---|---|
committer | Pierre Joye <pajoye@php.net> | 2010-11-18 15:22:22 +0000 |
commit | ce96fd6b0761d98353761bf78d5bfb55291179fd (patch) | |
tree | 0b66c858477f5ac7472bf35b842f89cdf4dce151 /ext/xsl/xsltprocessor.c | |
parent | 75631ab8ac231f141286428fd871ad31f2d71588 (diff) | |
download | php-git-ce96fd6b0761d98353761bf78d5bfb55291179fd.tar.gz |
- fix #39863, do not accept paths with NULL in them. See http://news.php.net/php.internals/50191, trunk will have the patch later (adding a macro and/or changing (some) APIs. Patch by Rasmus
Diffstat (limited to 'ext/xsl/xsltprocessor.c')
-rw-r--r-- | ext/xsl/xsltprocessor.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/ext/xsl/xsltprocessor.c b/ext/xsl/xsltprocessor.c index 1907f093b4..f111d64978 100644 --- a/ext/xsl/xsltprocessor.c +++ b/ext/xsl/xsltprocessor.c @@ -642,6 +642,9 @@ PHP_FUNCTION(xsl_xsltprocessor_transform_to_uri) ret = -1; if (newdocp) { + if (strlen(uri) != uri_len) { + RETURN_FALSE; + } ret = xsltSaveResultToFilename(uri, newdocp, sheetp, 0); xmlFreeDoc(newdocp); } @@ -845,7 +848,7 @@ PHP_FUNCTION(xsl_xsltprocessor_set_profiling) if (intern->profiling) { efree(intern->profiling); } - if (filename != NULL) { + if (filename != NULL && strlen(filename) == filename_len) { intern->profiling = estrndup(filename,filename_len); } else { intern->profiling = NULL; |