iliaa Tue Dec 10 11:37:49 2002 EDT
Modified files: (Branch: PHP_4_3)
/php4/main streams.c
Log:
Fix for bug #20831.
Index: php4/main/streams.c
diff -u php4/main/streams.c:1.125.2.18 php4/main/streams.c:1.125.2.19
--- php4/main/streams.c:1.125.2.18 Tue Dec 10 11:18:59 2002
+++ php4/main/streams.c Tue Dec 10 11:37:48 2002
@@ -20,7 +20,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: streams.c,v 1.125.2.18 2002/12/10 16:18:59 edink Exp $ */
+/* $Id: streams.c,v 1.125.2.19 2002/12/10 16:37:48 iliaa Exp $ */
#define _GNU_SOURCE
#include "php.h"
@@ -1768,16 +1768,12 @@
if (fp) {
/* sanity checks for include/require */
if (options & STREAM_OPEN_FOR_INCLUDE && (fstat(fileno(fp), &st) == -1
|| !S_ISREG(st.st_mode))) {
- int is_unc = 0;
-
#ifdef PHP_WIN32
/* skip the sanity check; fstat doesn't appear to work on
* UNC paths */
- is_unc = IS_UNC_PATH(filename, strlen(filename));
-#endif
- if (!is_unc) {
+ if (!IS_UNC_PATH(filename, strlen(filename)))
+#endif
goto err;
- }
}
ret = php_stream_fopen_from_file_rel(fp, mode);
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php