[coverity] 1543080 Dereference before null check
This commit is contained in:
parent
0d09ae9ad4
commit
600c7a8999
@ -831,7 +831,10 @@ static BOOL http_response_parse_header_field(HttpResponse* response, const char*
|
||||
const char* value)
|
||||
{
|
||||
BOOL status = TRUE;
|
||||
if (!response || !name)
|
||||
|
||||
WINPR_ASSERT(response);
|
||||
|
||||
if (!name)
|
||||
return FALSE;
|
||||
|
||||
if (_stricmp(name, "Content-Length") == 0)
|
||||
@ -925,6 +928,10 @@ static BOOL http_response_parse_header_field(HttpResponse* response, const char*
|
||||
*separator = '\0';
|
||||
CookieName = value;
|
||||
CookieValue = separator + 1;
|
||||
|
||||
if (!CookieName || !CookieValue)
|
||||
return FALSE;
|
||||
|
||||
if (*CookieValue == '"')
|
||||
{
|
||||
char* p = CookieValue;
|
||||
@ -945,9 +952,6 @@ static BOOL http_response_parse_header_field(HttpResponse* response, const char*
|
||||
}
|
||||
*p = '\0';
|
||||
}
|
||||
|
||||
if (!CookieName || !CookieValue)
|
||||
return FALSE;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user