1
0
mirror of https://github.com/SoftEtherVPN/SoftEtherVPN.git synced 2024-09-18 01:33:00 +03:00

fix nullptr deref

This commit is contained in:
icy17 2023-10-24 11:33:42 +08:00
parent 895c16e3e8
commit b28977d49a
2 changed files with 8 additions and 1 deletions

View File

@ -775,6 +775,10 @@ BUF *BigNumToBuf(const BIGNUM *bn)
size = BN_num_bytes(bn);
tmp = ZeroMalloc(size);
if (tmp == NULL)
{
return NULL;
}
BN_bn2bin(bn, tmp);
b = NewBuf();

View File

@ -5803,7 +5803,10 @@ SSL_PIPE *NewSslPipeEx3(bool server_mode, X *x, K *k, LIST *chain, DH_CTX *dh, b
#endif
ssl = SSL_new(ssl_ctx);
if (ssl == NULL)
{
return NULL;
}
SSL_set_ex_data(ssl, GetSslClientCertIndex(), clientcert);
}
Unlock(openssl_lock);