diff options
author | Ilia Alshanetsky <iliaa@php.net> | 2007-09-23 15:19:21 +0000 |
---|---|---|
committer | Ilia Alshanetsky <iliaa@php.net> | 2007-09-23 15:19:21 +0000 |
commit | f60df047f14071ade900af36ca6dbd2ab16abf9c (patch) | |
tree | 0158708979fc509c6d95a67b7426780865d5fd71 /main/safe_mode.c | |
parent | ddc1871576fa289c1dd614fb81cceebc77ec15bd (diff) | |
download | php-git-f60df047f14071ade900af36ca6dbd2ab16abf9c.tar.gz |
Fixed bug #42739 (mkdir() doesnt like a trailing slash when safe_mode is
enabled).
Diffstat (limited to 'main/safe_mode.c')
-rw-r--r-- | main/safe_mode.c | 2 |
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; |