cvs: php4(PHP_4_3) /main streams.c

From: Date: Thu, 13 Feb 2003 17:32:42 +0000
Subject: cvs: php4(PHP_4_3) /main streams.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-18787@lists.php.net to get a copy of this message
wez Thu Feb 13 12:32:42 2003 EDT Modified files: (Branch: PHP_4_3) /php4/main streams.c Log: MFH: relative path fix for win32 Index: php4/main/streams.c diff -u php4/main/streams.c:1.125.2.28 php4/main/streams.c:1.125.2.29 --- php4/main/streams.c:1.125.2.28 Thu Feb 13 09:43:19 2003 +++ php4/main/streams.c Thu Feb 13 12:32:41 2003 @@ -20,7 +20,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: streams.c,v 1.125.2.28 2003/02/13 14:43:19 wez Exp $ */ +/* $Id: streams.c,v 1.125.2.29 2003/02/13 17:32:41 wez Exp $ */ #define _GNU_SOURCE #include "php.h" @@ -1631,16 +1631,15 @@ filename_length = strlen(filename); /* Relative path open */ - if (*filename == '.' && (*(filename+1) == '/' || *(filename+1) == '.')) { + if (*filename == '.' && (IS_SLASH(filename[1]) || filename[1] == '.')) { /* further checks, we could have ....... filenames */ ptr = filename + 1; if (*ptr == '.') { while (*(++ptr) == '.'); - if (*ptr != '/') { /* not a relative path after all */ + if (!IS_SLASH(*ptr)) { /* not a relative path after all */ goto not_relative_path; } } - if (php_check_open_basedir(filename TSRMLS_CC)) { return NULL;

« previous php.cvs (#18787) next »