From 72e7bfdedf831d9e5bc56d48f73aafe9b3f0255d Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Wed, 18 Apr 2007 11:58:40 +0000 Subject: [PATCH] Fixed endless loop in open_basedir check --- main/fopen_wrappers.c | 2 ++ 1 file changed, 2 insertions(+) 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'; -- 2.40.0