]> granicus.if.org Git - php/commitdiff
- Fix for bug #15547 (Patch by Justin Garrett <usjgarrett@byu.edu>)
authorDerick Rethans <derick@php.net>
Tue, 2 Jul 2002 06:16:35 +0000 (06:16 +0000)
committerDerick Rethans <derick@php.net>
Tue, 2 Jul 2002 06:16:35 +0000 (06:16 +0000)
ext/standard/file.c

index ee98e133a6a2631f1cb21000b48078926b4aaf1b..1e7e3d8a9aa6072ba73fd1b21da41112af17a173 100644 (file)
@@ -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));