From: Daniel Stenberg Date: Sun, 22 Aug 2021 22:34:16 +0000 (+0200) Subject: urlapi.c:seturl: assert URL instead of using if-check X-Git-Tag: curl-7_79_0~76 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=98e6db24c44e2bd05cb591658c7c46af6cc0c9d5;p=thirdparty%2Fcurl.git urlapi.c:seturl: assert URL instead of using if-check There's no code flow possible where this can happen. The assert makes sure it also won't be introduced undetected in the future. Closes #7610 --- diff --git a/lib/urlapi.c b/lib/urlapi.c index 905c499d99..7f03862cfa 100644 --- a/lib/urlapi.c +++ b/lib/urlapi.c @@ -770,8 +770,7 @@ static CURLUcode seturl(const char *url, CURLU *u, unsigned int flags) size_t schemelen = 0; size_t urllen; - if(!url) - return CURLUE_MALFORMED_INPUT; + DEBUGASSERT(url); /************************************************************* * Parse the URL.