mirror of
https://github.com/SoftEtherVPN/SoftEtherVPN.git
synced 2024-11-24 18:39:53 +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);
|
||||
tmp = ZeroMalloc(size);
|
||||
if (tmp == NULL)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
BN_bn2bin(bn, tmp);
|
||||
|
||||
b = NewBuf();
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user