summaryrefslogtreecommitdiff
path: root/www/php4/patches/patch-as
diff options
context:
space:
mode:
Diffstat (limited to 'www/php4/patches/patch-as')
-rw-r--r--www/php4/patches/patch-as43
1 files changed, 0 insertions, 43 deletions
diff --git a/www/php4/patches/patch-as b/www/php4/patches/patch-as
deleted file mode 100644
index 984a8a3b7aa..00000000000
--- a/www/php4/patches/patch-as
+++ /dev/null
@@ -1,43 +0,0 @@
-$NetBSD: patch-as,v 1.1 2006/04/14 13:48:33 cube Exp $
-
---- ext/standard/file.c.orig 2006-01-01 14:46:57.000000000 +0100
-+++ ext/standard/file.c
-@@ -552,7 +552,7 @@ PHP_FUNCTION(tempnam)
- pval **arg1, **arg2;
- char *d;
- char *opened_path;
-- char p[64];
-+ char *p;
- FILE *fp;
-
- if (ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2, &arg1, &arg2) == FAILURE) {
-@@ -566,7 +566,11 @@ PHP_FUNCTION(tempnam)
- }
-
- d = estrndup(Z_STRVAL_PP(arg1), Z_STRLEN_PP(arg1));
-- strlcpy(p, Z_STRVAL_PP(arg2), sizeof(p));
-+
-+ p = php_basename(Z_STRVAL_PP(arg2), Z_STRLEN_PP(arg2), NULL, 0);
-+ if (strlen(p) > 64) {
-+ p[63] = '\0';
-+ }
-
- if ((fp = php_open_temporary_file(d, p, &opened_path TSRMLS_CC))) {
- fclose(fp);
-@@ -574,6 +578,7 @@ PHP_FUNCTION(tempnam)
- } else {
- RETVAL_FALSE;
- }
-+ efree(p);
- efree(d);
- }
- /* }}} */
-@@ -2196,7 +2201,7 @@ no_stat:
- safe_to_copy:
-
- srcstream = php_stream_open_wrapper(src, "rb",
-- STREAM_DISABLE_OPEN_BASEDIR | REPORT_ERRORS,
-+ ENFORCE_SAFE_MODE | REPORT_ERRORS,
- NULL);
-
- if (!srcstream)