Add missing null checks in wallet/crypto_tests.cpp
Align code with Bitcoin
This commit is contained in:
parent
0982d6d3c8
commit
11e27d7af5
@ -44,6 +44,8 @@ bool OldEncrypt(const CKeyingMaterial& vchPlaintext, std::vector<unsigned char>
|
||||
|
||||
EVP_CIPHER_CTX *ctx = EVP_CIPHER_CTX_new();
|
||||
|
||||
if (!ctx) return false;
|
||||
|
||||
bool fOk = true;
|
||||
|
||||
EVP_CIPHER_CTX_init(ctx);
|
||||
@ -70,6 +72,8 @@ bool OldDecrypt(const std::vector<unsigned char>& vchCiphertext, CKeyingMaterial
|
||||
|
||||
EVP_CIPHER_CTX *ctx = EVP_CIPHER_CTX_new();
|
||||
|
||||
if (!ctx) return false;
|
||||
|
||||
bool fOk = true;
|
||||
|
||||
EVP_CIPHER_CTX_init(ctx);
|
||||
|
Loading…
Reference in New Issue
Block a user