From: Dmitry Stogov Date: Wed, 18 Apr 2007 11:59:03 +0000 (+0000) Subject: Fixed endless loop in open_basedir check X-Git-Tag: RELEASE_1_2_0~284 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=44ac45fd92be69029e1e0c7a9294fe43de029d59;p=php Fixed endless loop in open_basedir check --- diff --git a/main/fopen_wrappers.c b/main/fopen_wrappers.c index 843246e7eb..476b4c8442 100644 --- a/main/fopen_wrappers.c +++ b/main/fopen_wrappers.c @@ -208,6 +208,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';