Revision: http://svn.php.net/viewvc?view=revision&revision=302969
Log:
- sb needed only in safemode
Changed paths:
U php/php-src/branches/PHP_5_3/main/streams/plain_wrapper.c
Modified: php/php-src/branches/PHP_5_3/main/streams/plain_wrapper.c
===================================================================
--- php/php-src/branches/PHP_5_3/main/streams/plain_wrapper.c 2010-09-01 10:03:06 UTC (rev 302968)
+++ php/php-src/branches/PHP_5_3/main/streams/plain_wrapper.c 2010-09-01 10:13:46 UTC (rev 302969)
@@ -1306,7 +1306,6 @@
char *pathbuf, *ptr, *end;
char *exec_fname;
char trypath[MAXPATHLEN];
- struct stat sb;
php_stream *stream;
int path_length;
int filename_length;
@@ -1448,6 +1447,8 @@
}
if (PG(safe_mode)) {
+ struct stat sb;
+
if (VCWD_STAT(trypath, &sb) == 0) {
/* file exists ... check permission */
if ((php_check_safe_mode_include_dir(trypath TSRMLS_CC) == 0) ||