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);