diff options
author | Reyk Floeter <reyk@esdenera.com> | 2014-07-25 23:06:50 +0200 |
---|---|---|
committer | Reyk Floeter <reyk@esdenera.com> | 2014-07-25 23:06:50 +0200 |
commit | e30ef12693dc3dcdf72573424c839afb10769b70 (patch) | |
tree | c24f3231a41a6b7e13372702217289775210e052 /httpd.c | |
parent | e3e992b54315a4d8e9bf446dab17ebde280903e1 (diff) | |
download | httpd-e30ef12693dc3dcdf72573424c839afb10769b70.tar.gz httpd-e30ef12693dc3dcdf72573424c839afb10769b70.zip |
sync
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); |