mirror of
https://github.com/SoftEtherVPN/SoftEtherVPN.git
synced 2024-11-26 11:29:53 +03:00
null pointer derefence found by clang static analyzer
This commit is contained in:
parent
a658963cdc
commit
8d59c33b92
@ -6651,8 +6651,11 @@ SOCK *SocksConnectEx2(CONNECTION *c, char *proxy_host_name, UINT proxy_port,
|
|||||||
// Validate arguments
|
// Validate arguments
|
||||||
if (c == NULL || proxy_host_name == NULL || proxy_port == 0 || server_host_name == NULL
|
if (c == NULL || proxy_host_name == NULL || proxy_port == 0 || server_host_name == NULL
|
||||||
|| server_port == 0)
|
|| server_port == 0)
|
||||||
|
{
|
||||||
|
if (c != NULL)
|
||||||
{
|
{
|
||||||
c->Err = ERR_PROXY_CONNECT_FAILED;
|
c->Err = ERR_PROXY_CONNECT_FAILED;
|
||||||
|
}
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -6845,8 +6848,11 @@ SOCK *ProxyConnectEx2(CONNECTION *c, char *proxy_host_name, UINT proxy_port,
|
|||||||
// Validate arguments
|
// Validate arguments
|
||||||
if (c == NULL || proxy_host_name == NULL || proxy_port == 0 || server_host_name == NULL ||
|
if (c == NULL || proxy_host_name == NULL || proxy_port == 0 || server_host_name == NULL ||
|
||||||
server_port == 0)
|
server_port == 0)
|
||||||
|
{
|
||||||
|
if( c != NULL)
|
||||||
{
|
{
|
||||||
c->Err = ERR_PROXY_CONNECT_FAILED;
|
c->Err = ERR_PROXY_CONNECT_FAILED;
|
||||||
|
}
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
if (username != NULL && password != NULL &&
|
if (username != NULL && password != NULL &&
|
||||||
|
Loading…
Reference in New Issue
Block a user