ASF Bugzilla – Attachment 32328 Details for
Bug 54596
Relative path functionality truncates last character of configuration parameters preventing connector from working.
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
2014-12-24_jk_54596_c7.patch
2014-12-24_jk_54596_c7.patch (text/plain), 3.01 KB, created by
Konstantin Kolinko
on 2014-12-24 03:38:02 UTC
(
hide
)
Description:
2014-12-24_jk_54596_c7.patch
Filename:
MIME Type:
Creator:
Konstantin Kolinko
Created:
2014-12-24 03:38:02 UTC
Size:
3.01 KB
patch
obsolete
>Index: native/iis/jk_isapi_plugin.c >=================================================================== >--- native/iis/jk_isapi_plugin.c (revision 1647715) >+++ native/iis/jk_isapi_plugin.c (working copy) >@@ -3710,9 +3710,10 @@ > } \ > } while(0) > >-static char *skip_prefix(char *path, char **sp, char **cp) >+static char *skip_prefix(char *path, char **sp) > { > size_t size; >+ char *cp; > > /* Convert everything to forward slashes > */ >@@ -3721,6 +3722,7 @@ > */ > path = NO2UNC(path); > size = strlen(path); >+ *sp = path; > if (size < 2) { > if (path[0] == ' ') { > /* Single Trailing space is invalid path >@@ -3742,7 +3744,6 @@ > return 0; > } > } >- *sp = path; > if (size > 1 && path[1] == ':' && IS_DRIVE_CHAR(path[0])) { > /* Never go above C: */ > path += 2; >@@ -3754,9 +3755,9 @@ > /* This is probably //./pipe/ */ > return path; > } >- *cp = strchr(path + 2, '/'); >- if (*cp != 0) >- path = *cp; >+ cp = strchr(path + 2, '/'); >+ if (cp != 0) >+ path = cp; > else { > /* We only have //share > */ >@@ -3772,25 +3773,30 @@ > char *cp; > int ch = '/'; > >- path = skip_prefix(path, &sp, &cp); >+ path = skip_prefix(path, &sp); > if (!path) > return 0; >- /* Remaining is the same as on unixes */ >+ if (path != sp) { >+ /* Unexpected. Expected a relative path, but it starts with C: or //share/ */ >+ SetLastError(ERROR_BAD_PATHNAME); >+ return 0; >+ } > cp = path; > while (*path) { > if (IS_PATH_SEP(ch) && *path == '.') { >+ /* nd: number of consecutive dot characters */ > int nd = 0; > while (path[nd] == '.') > nd++; >- if (nd > 2 && path[nd] == '/') { >- SetLastError(ERROR_BAD_PATHNAME); >- return 0; >- } > if (IS_PATH_SEP(path[nd])) { >+ if (nd > 2) { >+ SetLastError(ERROR_BAD_PATHNAME); >+ return 0; >+ } > path += nd; > if (*path) > path++; >- while (nd > 1) { >+ if (nd > 1) { > if (cp > sp + 1) { > cp--; > while (cp > sp) { >@@ -3801,9 +3807,7 @@ > } > else { > (*remain)++; >- break; > } >- nd--; > } > } > else { >@@ -3843,8 +3847,7 @@ > if (remain > 0) { > char *skip = root + rsz - 1; > char *spr; >- char *cpr; >- char *start = skip_prefix(root, &spr, &cpr); >+ char *start = skip_prefix(root, &spr); > if (*skip == '/') > skip--; > while (remain > 0 && skip >= start) {
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 54596
: 32328