]> granicus.if.org Git - php/commitdiff
- Use spprintf to avoid two calls to zend_get_executed_filename, suggested
authorMelvyn Sopacua <msopacua@php.net>
Sat, 2 Nov 2002 15:01:43 +0000 (15:01 +0000)
committerMelvyn Sopacua <msopacua@php.net>
Sat, 2 Nov 2002 15:01:43 +0000 (15:01 +0000)
  by Marcus Börger

ext/xslt/sablot.c

index 474f77f221ffc7256c0b7ec60f6c893e81cbbfe3..b8de408f95b9bc5292496a9b6b97d3f0c3b23b4b 100644 (file)
@@ -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);