From 93a2f11ff6cb6536026bc4a85d762298f839c26e Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Wed, 26 Feb 2025 15:23:34 +0100 Subject: [PATCH] fixup add null check to please tools --- lib/urlapi.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/urlapi.c b/lib/urlapi.c index 1ee9f2769d..060ccec151 100644 --- a/lib/urlapi.c +++ b/lib/urlapi.c @@ -249,6 +249,8 @@ static CURLUcode redirect_url(const char *base, const char *relurl, /* protsep points to the start of the hostname, after [scheme]:// */ const char *protsep = base + strlen(u->scheme) + 3; DEBUGASSERT(base && relurl && u); /* all set here */ + if(!base) + return CURLUE_MALFORMED_INPUT; /* should never happen */ /* handle different relative URL types */ switch(relurl[0]) {