Permalink
Browse files

Correctly report high-S violations

Github-Pull: #7500
Rebased-From: 9d95187
  • Loading branch information...
sipa authored and laanwj committed Feb 10, 2016
1 parent 1329963 commit 889e5b3050e78614acb45ea0845dc8fd33b157bf
Showing with 4 additions and 1 deletion.
  1. +4 −1 src/script/interpreter.cpp
@@ -165,7 +165,10 @@ bool static IsLowDERSignature(const valtype &vchSig, ScriptError* serror) {
return set_error(serror, SCRIPT_ERR_SIG_DER);
}
std::vector<unsigned char> vchSigCopy(vchSig.begin(), vchSig.begin() + vchSig.size() - 1);
- return CPubKey::CheckLowS(vchSigCopy);
+ if (!CPubKey::CheckLowS(vchSigCopy)) {
+ return set_error(serror, SCRIPT_ERR_SIG_HIGH_S);
+ }
+ return true;
}
bool static IsDefinedHashtypeSignature(const valtype &vchSig) {

0 comments on commit 889e5b3

Please sign in to comment.