diff options
-rw-r--r-- | ext/standard/file.c | 5 |
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)); |