From b865a491b39293611546f1b5461bcfac37ff9377 Mon Sep 17 00:00:00 2001 From: Mole Shang <135e2@135e2.dev> Date: Tue, 8 Aug 2023 20:51:05 +0800 Subject: process_url: copy full URL --- src/process_url.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/process_url.c b/src/process_url.c index 30b7f71..7d04f37 100644 --- a/src/process_url.c +++ b/src/process_url.c @@ -175,8 +175,8 @@ static int parse_url(const char *URL, const char *outdir, char *fn) { append_log("Got site: %s\n", domain); thrd_t t; options.site = site_map.pairs[i].site; - options.URL = malloc(strlen(domain) + strlen(path) + 10); - sprintf(options.URL, "https://%s%s", domain, path); + options.URL = malloc(strlen(URL) + 1); + strcpy(options.URL, URL); options.path = malloc(strlen(path) + 1); strcpy(options.path, path); if (query) { -- cgit v1.2.3