Skip to content

Commit 0218acb

Browse files
committed
Fix for bug #72513
1 parent aca4f65 commit 0218acb

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

TSRM/tsrm_virtual_cwd.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -621,14 +621,14 @@ CWD_API void realpath_cache_del(const char *path, int path_len TSRMLS_DC) /* {{{
621621
memcmp(path, (*bucket)->path, path_len) == 0) {
622622
realpath_cache_bucket *r = *bucket;
623623
*bucket = (*bucket)->next;
624-
624+
625625
/* if the pointers match then only subtract the length of the path */
626626
if(r->path == r->realpath) {
627627
CWDG(realpath_cache_size) -= sizeof(realpath_cache_bucket) + r->path_len + 1;
628628
} else {
629629
CWDG(realpath_cache_size) -= sizeof(realpath_cache_bucket) + r->path_len + 1 + r->realpath_len + 1;
630630
}
631-
631+
632632
free(r);
633633
return;
634634
} else {
@@ -704,7 +704,7 @@ static inline realpath_cache_bucket* realpath_cache_find(const char *path, int p
704704
realpath_cache_bucket *r = *bucket;
705705
*bucket = (*bucket)->next;
706706

707-
/* if the pointers match then only subtract the length of the path */
707+
/* if the pointers match then only subtract the length of the path */
708708
if(r->path == r->realpath) {
709709
CWDG(realpath_cache_size) -= sizeof(realpath_cache_bucket) + r->path_len + 1;
710710
} else {
@@ -1159,7 +1159,7 @@ CWD_API int virtual_file_ex(cwd_state *state, const char *path, verify_path_func
11591159
int add_slash;
11601160
void *tmp;
11611161

1162-
if (path_length == 0 || path_length >= MAXPATHLEN-1) {
1162+
if (path_length <= 0 || path_length >= MAXPATHLEN-1) {
11631163
#ifdef TSRM_WIN32
11641164
# if _MSC_VER < 1300
11651165
errno = EINVAL;

0 commit comments

Comments
 (0)