scottmac Tue Oct 9 10:05:08 2007 UTC
Modified files: (Branch: PHP_5_3)
/php-src/main fopen_wrappers.c
Log:
MFH: Fix expand_filepath when including relative files, ideally you should
test you code...
http://cvs.php.net/viewvc.cgi/php-src/main/fopen_wrappers.c?r1=1.175.2.3.2.13.2.2&r2=1.175.2.3.2.13.2.3&diff_format=u
Index: php-src/main/fopen_wrappers.c
diff -u php-src/main/fopen_wrappers.c:1.175.2.3.2.13.2.2
php-src/main/fopen_wrappers.c:1.175.2.3.2.13.2.3
--- php-src/main/fopen_wrappers.c:1.175.2.3.2.13.2.2 Tue Oct 9 08:40:36 2007
+++ php-src/main/fopen_wrappers.c Tue Oct 9 10:05:08 2007
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: fopen_wrappers.c,v 1.175.2.3.2.13.2.2 2007/10/09 08:40:36 jani Exp $ */
+/* $Id: fopen_wrappers.c,v 1.175.2.3.2.13.2.3 2007/10/09 10:05:08 scottmac Exp
$ */
/* {{{ includes
*/
@@ -621,8 +621,10 @@
copy_len = strlen(filepath) > MAXPATHLEN - 1 ?
MAXPATHLEN - 1 : strlen(filepath);
real_path = estrndup(filepath, copy_len);
return real_path;
+ } else {
+ cwd[0] = '\0';
}
- } else {
+ } else if (!result) {
cwd[0] = '\0';
}
}
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php