From ff86a62579fff1b26a66b060bdf1b40a09056e98 Mon Sep 17 00:00:00 2001 From: skrimix <28156185+skrimix@users.noreply.github.com> Date: Tue, 2 Jul 2024 00:02:16 +0500 Subject: [PATCH] conn: Increase URL length limit to 8000 --- src/axel.h | 2 +- src/conn.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/axel.h b/src/axel.h index 2e28c361..f8d742ad 100644 --- a/src/axel.h +++ b/src/axel.h @@ -89,7 +89,7 @@ #endif /* Compiled-in settings */ -#define MAX_STRING ((size_t)1024) +#define MAX_STRING ((size_t)8100) #define MAX_ADD_HEADERS 10 #define MAX_REDIRECT 20 #define DEFAULT_IO_TIMEOUT 120 diff --git a/src/conn.c b/src/conn.c index 31a26028..0d908656 100644 --- a/src/conn.c +++ b/src/conn.c @@ -423,7 +423,7 @@ conn_info(conn_t *conn) return conn_info_ftp(conn); } - char s[1005]; + char s[8005]; long long int i = 0; struct urlseq *urlseq = urlseq_init(conn->conf->max_redirect); @@ -448,7 +448,7 @@ conn_info(conn_t *conn) break; if ((t = http_header(conn->http, "location:")) == NULL) return 0; - sscanf(t, "%1000s", s); + sscanf(t, "%8000s", s); if (s[0] == '/') { abuf_printf(conn->http->headers, "%s%s:%i%s", scheme_from_proto(conn->proto),