fail immediately on an empty signature

Github-Pull: #5634
Rebased-From: 8dccba6a45
This commit is contained in:
Wladimir J. van der Laan 2015-01-10 08:58:47 +01:00
parent f047dfa7df
commit 60c51f1c38
No known key found for this signature in database
GPG Key ID: 74810B012346C9A6
1 changed files with 3 additions and 0 deletions

View File

@ -227,6 +227,9 @@ public:
}
bool Verify(const uint256 &hash, const std::vector<unsigned char>& vchSig) {
if (vchSig.empty())
return false;
// New versions of OpenSSL will reject non-canonical DER signatures. de/re-serialize first.
unsigned char *norm_der = NULL;
ECDSA_SIG *norm_sig = ECDSA_SIG_new();