mirror of
https://github.com/SoftEtherVPN/SoftEtherVPN.git
synced 2024-11-22 17:39:53 +03:00
resolved several cppcheck findings:
[src/Cedar/Admin.c:418]: (error) Possible null pointer dereference: cedar [src/Cedar/Admin.c:616]: (error) Possible null pointer dereference: cedar [src/Cedar/WebUI.c:369]: (error) Uninitialized variable: retcode [src/Mayaqua/Encrypt.c:4485]: (error) Uninitialized variable: key [src/Mayaqua/Network.c:13548]: (error) Uninitialized variable: e
This commit is contained in:
parent
4df2eb4f9c
commit
334765ffd7
@ -410,11 +410,12 @@ PACK *AdminDispatch(RPC *rpc, char *name, PACK *p)
|
|||||||
|
|
||||||
server = a->Server;
|
server = a->Server;
|
||||||
|
|
||||||
if (server != NULL)
|
if (server == NULL)
|
||||||
{
|
{
|
||||||
cedar = server->Cedar;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
cedar = server->Cedar;
|
||||||
Lock(cedar->CedarSuperLock);
|
Lock(cedar->CedarSuperLock);
|
||||||
|
|
||||||
if (true)
|
if (true)
|
||||||
|
@ -326,7 +326,7 @@ static wchar_t *WpListener(WEBUI *wu, LIST *params)
|
|||||||
WU_CONTEXT *context = WuGetContext(wu->Contexts, sessionkey);
|
WU_CONTEXT *context = WuGetContext(wu->Contexts, sessionkey);
|
||||||
char *cmd = (char*)StrMapSearch(params, "CMD");
|
char *cmd = (char*)StrMapSearch(params, "CMD");
|
||||||
RPC_LISTENER t;
|
RPC_LISTENER t;
|
||||||
UINT retcode;
|
UINT retcode = ERR_NO_ERROR;
|
||||||
|
|
||||||
if(context == NULL)
|
if(context == NULL)
|
||||||
{
|
{
|
||||||
|
@ -4482,7 +4482,7 @@ void DesEcbEncrypt(void *dst, void *src, void *key_7bytes)
|
|||||||
DES_cblock key;
|
DES_cblock key;
|
||||||
DES_key_schedule ks;
|
DES_key_schedule ks;
|
||||||
// Validate arguments
|
// Validate arguments
|
||||||
if (dst == NULL || src == NULL || key == NULL)
|
if (dst == NULL || src == NULL || key_7bytes == NULL)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -13490,7 +13490,7 @@ UINT SecureRecv(SOCK *sock, void *data, UINT size)
|
|||||||
UINT SecureSend(SOCK *sock, void *data, UINT size)
|
UINT SecureSend(SOCK *sock, void *data, UINT size)
|
||||||
{
|
{
|
||||||
SOCKET s;
|
SOCKET s;
|
||||||
int ret, e;
|
int ret, e = SSL_ERROR_NONE;
|
||||||
SSL *ssl;
|
SSL *ssl;
|
||||||
s = sock->socket;
|
s = sock->socket;
|
||||||
ssl = sock->ssl;
|
ssl = sock->ssl;
|
||||||
|
Loading…
Reference in New Issue
Block a user