From 99cd325a9d7e8a7a67258ffc82b6d658a91bd58f Mon Sep 17 00:00:00 2001 From: Wilfried Goesgens Date: Thu, 19 Jul 2012 12:56:35 +0200 Subject: [PATCH] fix false positive from scan-build: url->User is NULLed by memset, so puserend wouldn't be accessed uninitialized. --- libcitadel/lib/urlhandling.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libcitadel/lib/urlhandling.c b/libcitadel/lib/urlhandling.c index 4cca8a1f5..41d38324a 100644 --- a/libcitadel/lib/urlhandling.c +++ b/libcitadel/lib/urlhandling.c @@ -89,6 +89,8 @@ int ParseURL(ParsedURL **Url, StrBuf *UrlStr, unsigned short DefaultPort) StrBufPeek(url->URL, pUserEnd, 0, '\0'); StrBufPeek(url->URL, pCredEnd, 0, '\0'); } + else + pUserEnd = NULL; pPort = NULL; if (*url->Host == '[') { -- 2.30.2