mirror of
https://github.com/SoftEtherVPN/SoftEtherVPN.git
synced 2024-11-25 02:49:52 +03:00
fix nullptr deref
This commit is contained in:
parent
895c16e3e8
commit
b28977d49a
@ -775,6 +775,10 @@ BUF *BigNumToBuf(const BIGNUM *bn)
|
|||||||
|
|
||||||
size = BN_num_bytes(bn);
|
size = BN_num_bytes(bn);
|
||||||
tmp = ZeroMalloc(size);
|
tmp = ZeroMalloc(size);
|
||||||
|
if (tmp == NULL)
|
||||||
|
{
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
BN_bn2bin(bn, tmp);
|
BN_bn2bin(bn, tmp);
|
||||||
|
|
||||||
b = NewBuf();
|
b = NewBuf();
|
||||||
|
@ -5803,7 +5803,10 @@ SSL_PIPE *NewSslPipeEx3(bool server_mode, X *x, K *k, LIST *chain, DH_CTX *dh, b
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
ssl = SSL_new(ssl_ctx);
|
ssl = SSL_new(ssl_ctx);
|
||||||
|
if (ssl == NULL)
|
||||||
|
{
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
SSL_set_ex_data(ssl, GetSslClientCertIndex(), clientcert);
|
SSL_set_ex_data(ssl, GetSslClientCertIndex(), clientcert);
|
||||||
}
|
}
|
||||||
Unlock(openssl_lock);
|
Unlock(openssl_lock);
|
||||||
|
Loading…
Reference in New Issue
Block a user