summaryrefslogtreecommitdiff
path: root/browse.c
diff options
context:
space:
mode:
Diffstat (limited to 'browse.c')
-rw-r--r--browse.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/browse.c b/browse.c
index 79b3f9c..849f571 100644
--- a/browse.c
+++ b/browse.c
@@ -71,7 +71,7 @@ build_browse_url(struct kreq * r, struct file * file)
"browse: action URL overflow: %s", action_url);
return 0;
}
- file->action_url = v_strcpy(action_url, action_url_len);
+ file->action_url = strndup(action_url, action_url_len);
if (file->action_url == NULL) {
kutil_warn(r, NULL,
"browse: unable to allocate file url buffer: %s",
@@ -188,7 +188,7 @@ browse(struct kreq * r)
struct template_data data;
/* check that the requested URL can be safely processed */
- if (!check_request_path(r->path))
+ if (!check_request_path(r->path, r->suffix))
http_exit(r, KHTTP_400, "browse: Invalid request path");
/* list requested directory content */