From f78f0eccc53c622b9f5b20c16b94255a9782b476 Mon Sep 17 00:00:00 2001 From: Daniel Lenski Date: Thu, 1 Apr 2021 13:09:58 -0700 Subject: [PATCH] bugfix internal_get_url Don't want (null) jammed into our URLs. I broke this in c8ca180f02a569e6692c699eb8aa70df976d49a5. Signed-off-by: Daniel Lenski --- http.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/http.c b/http.c index 8bd60451..261cf916 100644 --- a/http.c +++ b/http.c @@ -855,7 +855,8 @@ int internal_parse_url(const char *url, char **res_proto, char **res_host, char *internal_get_url(struct openconnect_info *vpninfo) { char *url; - if (asprintf(&url, "https://%s%s%s", vpninfo->hostname, vpninfo->urlpath ? "/" : "", vpninfo->urlpath) < 0) + if (asprintf(&url, "https://%s%s%s", vpninfo->hostname, + vpninfo->urlpath ? "/" : "", vpninfo->urlpath ? : "") < 0) return NULL; else return url; -- 2.49.0