diff --git a/src/key.cpp b/src/key.cpp index e5943af79..a845ba13d 100644 --- a/src/key.cpp +++ b/src/key.cpp @@ -227,6 +227,9 @@ public: } bool Verify(const uint256 &hash, const std::vector& 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();