Skip to content

Commit 889e5b3

Browse files
sipalaanwj
authored andcommitted
Correctly report high-S violations
Github-Pull: #7500 Rebased-From: 9d95187
1 parent 1329963 commit 889e5b3

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

src/script/interpreter.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,10 @@ bool static IsLowDERSignature(const valtype &vchSig, ScriptError* serror) {
165165
return set_error(serror, SCRIPT_ERR_SIG_DER);
166166
}
167167
std::vector<unsigned char> vchSigCopy(vchSig.begin(), vchSig.begin() + vchSig.size() - 1);
168-
return CPubKey::CheckLowS(vchSigCopy);
168+
if (!CPubKey::CheckLowS(vchSigCopy)) {
169+
return set_error(serror, SCRIPT_ERR_SIG_HIGH_S);
170+
}
171+
return true;
169172
}
170173

171174
bool static IsDefinedHashtypeSignature(const valtype &vchSig) {

0 commit comments

Comments
 (0)