summaryrefslogtreecommitdiff
path: root/url.c
diff options
context:
space:
mode:
authorVincent Douillet <vincent@vdouillet.fr>2023-08-29 18:13:30 +0200
committerVincent Douillet <vincent@vdouillet.fr>2023-08-29 18:13:30 +0200
commit2acc8db2762b98eb061241109877527d58a560bc (patch)
tree4f71b3bc0f934b76f839a5ee3640c91b972c1912 /url.c
parent26a77087027327d72d7229866a1ce12ad11a4d63 (diff)
use PATH_MAX
Diffstat (limited to 'url.c')
-rw-r--r--url.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/url.c b/url.c
index 6ed2c19..53a26dc 100644
--- a/url.c
+++ b/url.c
@@ -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';