From 8a210264e71b745f2fcb219ba01e3222cf97fd83 Mon Sep 17 00:00:00 2001 From: Melvyn Sopacua Date: Sat, 2 Nov 2002 15:01:43 +0000 Subject: [PATCH] =?UTF-8?q?-=20Use=20spprintf=20to=20avoid=20two=20calls?= =?UTF-8?q?=20to=20zend=5Fget=5Fexecuted=5Ffilename,=20suggested=20=20=20b?= =?UTF-8?q?y=20Marcus=20B=C3=B6rger?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ext/xslt/sablot.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ext/xslt/sablot.c b/ext/xslt/sablot.c index 474f77f221f..b8de408f95b 100644 --- a/ext/xslt/sablot.c +++ b/ext/xslt/sablot.c @@ -554,8 +554,7 @@ PHP_FUNCTION(xslt_process) /* Since we have args passed, we need to set the base uri, so pull in executor globals and set the base, using the current filename, specifally for the 'arg' scheme */ - baseuri = (char *)emalloc(strlen(zend_get_executed_filename(TSRMLS_C))+7+1); - sprintf(baseuri, "file://%s", zend_get_executed_filename(TSRMLS_C)); + spprintf(&baseuri, 0, "file://%s", zend_get_executed_filename(TSRMLS_C)); SablotSetBaseForScheme(XSLT_PROCESSOR(handle), "arg", baseuri);