Fix null pointer in ec wrapper

This commit is contained in:
JoelKatz
2015-06-19 15:53:08 -07:00
committed by Vinnie Falco
parent 72832c0fa2
commit 6ec5fa9cae
5 changed files with 26 additions and 26 deletions

View File

@@ -71,7 +71,7 @@ static bool ECDSAVerify (uint256 const& hash, std::uint8_t const* sig, size_t si
static bool ECDSAVerify (uint256 const& hash, Blob const& sig, const openssl::ec_key& key)
{
return ECDSAVerify (hash, sig.data(), sig.size(), (EC_KEY*) key.get());
return key.valid() && ECDSAVerify (hash, sig.data(), sig.size(), (EC_KEY*) key.get());
}
bool ECDSAVerify (uint256 const& hash,