From: Dmitry Stogov Date: Wed, 18 Apr 2007 11:58:40 +0000 (+0000) Subject: Fixed endless loop in open_basedir check X-Git-Tag: php-5.2.2RC2~56 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=72e7bfdedf831d9e5bc56d48f73aafe9b3f0255d;p=php Fixed endless loop in open_basedir check --- diff --git a/main/fopen_wrappers.c b/main/fopen_wrappers.c index 0b476cf5e4..88003527b5 100644 --- a/main/fopen_wrappers.c +++ b/main/fopen_wrappers.c @@ -151,6 +151,8 @@ PHPAPI int php_check_specific_open_basedir(const char *basedir, const char *path if (path_len > 1 && path_tmp[path_len - 2] == ':') { /* this is c:\, */ path_tmp[path_len] = '\0'; + } else { + path_tmp[path_len - 1] = '\0'; } #else path_tmp[path_len - 1] = '\0';