diff options
Diffstat (limited to 'httpd.c')
-rw-r--r-- | httpd.c | 11 |
1 files changed, 1 insertions, 10 deletions
@@ -466,24 +466,15 @@ canonicalize_host(const char *host, char *name, size_t len) } const char * -canonicalize_path(const char *root, const char *input, char *path, size_t len) +canonicalize_path(const char *input, char *path, size_t len) { const char *i; char *p, *start, *end; - size_t n; /* assuming input starts with '/' and is nul-terminated */ i = input; p = path; - /* prepend root directory, if specified */ - if (root != NULL) { - if ((n = strlcpy(path, root, len)) >= len) - return (NULL); - len -= n; - p += n; - } - if (*input != '/' || len < 3) return (NULL); |