diff options
author | Vincent Douillet <vincent@vdouillet.fr> | 2023-08-29 18:13:30 +0200 |
---|---|---|
committer | Vincent Douillet <vincent@vdouillet.fr> | 2023-08-29 18:13:30 +0200 |
commit | 2acc8db2762b98eb061241109877527d58a560bc (patch) | |
tree | 4f71b3bc0f934b76f839a5ee3640c91b972c1912 /url.c | |
parent | 26a77087027327d72d7229866a1ce12ad11a4d63 (diff) |
use PATH_MAX
Diffstat (limited to 'url.c')
-rw-r--r-- | url.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -29,6 +29,7 @@ */ #include <assert.h> +#include <limits.h> #include <stdarg.h> #include <string.h> @@ -39,7 +40,7 @@ check_request_path(char *path) { char *p_found; - if (strlen(path) >= URL_LENGTH_MAX) + if (strlen(path) >= PATH_MAX) return false; p_found = strstr(path, "/.."); @@ -55,7 +56,6 @@ url_build(char *dst, size_t dst_size,...) { va_list path_list; const char *path; - int path_index; size_t w_size; dst[0] = '\0'; |