From: Daniel Stenberg Date: Sun, 16 Oct 2022 16:09:14 +0000 (+0200) Subject: curl_path: return error if given a NULL homedir X-Git-Tag: curl-7_86_0~46 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=025bad1182ff87facbddd280dd07a0fc26b99f45;p=thirdparty%2Fcurl.git curl_path: return error if given a NULL homedir Closes #9740 --- diff --git a/lib/curl_path.c b/lib/curl_path.c index 259837539d..b55e83047d 100644 --- a/lib/curl_path.c +++ b/lib/curl_path.c @@ -122,7 +122,8 @@ CURLcode Curl_get_pathname(const char **cpp, char **path, char *homedir) bool relativePath = false; static const char WHITESPACE[] = " \t\r\n"; - if(!*cp) { + DEBUGASSERT(homedir); + if(!*cp || !homedir) { *cpp = NULL; *path = NULL; return CURLE_QUOTE_ERROR;