summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDerick Rethans <derick@php.net>2002-07-02 06:16:35 +0000
committerDerick Rethans <derick@php.net>2002-07-02 06:16:35 +0000
commit7b7608d630d3129510c4f15c0153250105032013 (patch)
tree301ed31ca1f5d33e526eb5c6ab561c2bbbfbefce
parent7e921b42a40ab1988d4ea653442e3ec078feaa94 (diff)
downloadphp-git-7b7608d630d3129510c4f15c0153250105032013.tar.gz
- Fix for bug #15547 (Patch by Justin Garrett <usjgarrett@byu.edu>)
-rw-r--r--ext/standard/file.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/ext/standard/file.c b/ext/standard/file.c
index ee98e133a6..1e7e3d8a9a 100644
--- a/ext/standard/file.c
+++ b/ext/standard/file.c
@@ -525,6 +525,11 @@ PHP_FUNCTION(tempnam)
}
convert_to_string_ex(arg1);
convert_to_string_ex(arg2);
+
+ if (php_check_open_basedir(Z_STRVAL_PP(arg1) TSRMLS_CC)) {
+ RETURN_FALSE;
+ }
+
d = estrndup(Z_STRVAL_PP(arg1), Z_STRLEN_PP(arg1));
strlcpy(p, Z_STRVAL_PP(arg2), sizeof(p));