summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntony Dovgal <tony2001@php.net>2006-03-28 09:46:35 +0000
committerAntony Dovgal <tony2001@php.net>2006-03-28 09:46:35 +0000
commit07e361458a81ad3e6d27f0966fb2ab131f5e5cbf (patch)
treec1dc5ce931eb7a5c6e10c7fbaa87ea424bb2daa3
parent779c4394e4de82063af74fe1b04652f70fb0b473 (diff)
downloadphp-git-07e361458a81ad3e6d27f0966fb2ab131f5e5cbf.tar.gz
fix build and #36887
-rw-r--r--ext/standard/file.c5
1 files changed, 2 insertions, 3 deletions
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';
}