From: Antony Dovgal Date: Tue, 28 Mar 2006 09:46:35 +0000 (+0000) Subject: fix build and #36887 X-Git-Tag: php-4.4.3RC1~32 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=07e361458a81ad3e6d27f0966fb2ab131f5e5cbf;p=php fix build and #36887 --- diff --git a/ext/standard/file.c b/ext/standard/file.c index c85fbd8aba..844e8f0712 100644 --- a/ext/standard/file.c +++ b/ext/standard/file.c @@ -554,7 +554,6 @@ PHP_FUNCTION(tempnam) char *opened_path; char *p; FILE *fp; - size_t p_len; if (ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2, &arg1, &arg2) == FAILURE) { WRONG_PARAM_COUNT; @@ -568,8 +567,8 @@ PHP_FUNCTION(tempnam) d = estrndup(Z_STRVAL_PP(arg1), Z_STRLEN_PP(arg1)); - php_basename(Z_STRVAL_PP(arg2), Z_STRLEN_PP(arg2), NULL, 0, &p, &p_len TSRMLS_CC); - if (p_len > 64) { + p = php_basename(Z_STRVAL_PP(arg2), Z_STRLEN_PP(arg2), NULL, 0); + if (strlen(p) > 64) { p[63] = '\0'; }