summaryrefslogtreecommitdiff
path: root/main
diff options
context:
space:
mode:
authorIlia Alshanetsky <iliaa@php.net>2007-09-23 15:19:21 +0000
committerIlia Alshanetsky <iliaa@php.net>2007-09-23 15:19:21 +0000
commitf60df047f14071ade900af36ca6dbd2ab16abf9c (patch)
tree0158708979fc509c6d95a67b7426780865d5fd71 /main
parentddc1871576fa289c1dd614fb81cceebc77ec15bd (diff)
downloadphp-git-f60df047f14071ade900af36ca6dbd2ab16abf9c.tar.gz
Fixed bug #42739 (mkdir() doesnt like a trailing slash when safe_mode is
enabled).
Diffstat (limited to 'main')
-rw-r--r--main/safe_mode.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/main/safe_mode.c b/main/safe_mode.c
index 6dc5640425..0c1523e57c 100644
--- a/main/safe_mode.c
+++ b/main/safe_mode.c
@@ -125,7 +125,7 @@ PHPAPI int php_checkuid_ex(const char *filename, const char *fopen_mode, int mod
/* root dir */
path[0] = DEFAULT_SLASH;
path[1] = '\0';
- } else if (s) {
+ } else if (s && *(s + 1) != '\0') { /* make sure that the / is not the last character */
*s = '\0';
VCWD_REALPATH(filename, path);
*s = DEFAULT_SLASH;