From: Derick Rethans Date: Tue, 2 Jul 2002 06:16:35 +0000 (+0000) Subject: - Fix for bug #15547 (Patch by Justin Garrett ) X-Git-Tag: xmlrpc_epi_0_51_merge_pt~51 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=7b7608d630d3129510c4f15c0153250105032013;p=php - Fix for bug #15547 (Patch by Justin Garrett ) --- 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));