summaryrefslogtreecommitdiff
path: root/utils/url.c
diff options
context:
space:
mode:
authorJames Bursa <james@netsurf-browser.org>2006-04-22 09:07:28 +0000
committerJames Bursa <james@netsurf-browser.org>2006-04-22 09:07:28 +0000
commit77907dd58403e4470515cade312e2567f77d1f2b (patch)
tree6ced37aaae227b52147ed0d2d28ee7b8820fb4cf /utils/url.c
parent79946e43c932bea2a336f93426d6b4efc07e1e30 (diff)
downloadnetsurf-77907dd58403e4470515cade312e2567f77d1f2b.tar.gz
Fix crash when a relative URL contains "//../".
svn path=/trunk/netsurf/; revision=2543
Diffstat (limited to 'utils/url.c')
-rw-r--r--utils/url.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/utils/url.c b/utils/url.c
index 352241e30..126bbcebd 100644
--- a/utils/url.c
+++ b/utils/url.c
@@ -47,7 +47,7 @@ void url_init(void)
"(#([^[:space:]]*))?"
"[[:space:]]*$", REG_EXTENDED);
regcomp_wrapper(&url_up_re,
- "/([^/]|[.][^./]|[^./][.]|[^./][^./]|[^/][^/][^/]+)?"
+ "/([^/]?|[.][^./]|[^./][.]|[^./][^./]|[^/][^/][^/]+)"
"/[.][.](/|$)",
REG_EXTENDED);
}
@@ -863,15 +863,15 @@ int main(int argc, char *argv[])
printf("<== '%s'\n", s);
free(s);
}*/
-/* if (1 != i) {
+ if (1 != i) {
res = url_join(argv[i], argv[1], &s);
if (res == URL_FUNC_OK) {
printf("'%s' + '%s' \t= '%s'\n", argv[1],
argv[i], s);
free(s);
}
- }*/
- printf("'%s' => ", argv[i]);
+ }
+/* printf("'%s' => ", argv[i]);
res = url_nice(argv[i], &s, true);
if (res == URL_FUNC_OK) {
printf("'%s', ", s);
@@ -886,7 +886,7 @@ int main(int argc, char *argv[])
} else {
printf("failed %u, ", res);
}
- printf("\n");
+ printf("\n");*/
}
return 0;
}