aboutsummaryrefslogtreecommitdiff
path: root/src/script/interpreter.cpp
diff options
context:
space:
mode:
authorPieter Wuille <pieter.wuille@gmail.com>2016-02-10 14:19:20 +0100
committerPieter Wuille <pieter.wuille@gmail.com>2016-02-10 14:19:20 +0100
commit9d95187d5ddee56b6dfb55985008bdf70aed31f2 (patch)
tree097a7f336f9be35f531fd629042bdf5b37799c11 /src/script/interpreter.cpp
parent11d74f6a6b3452d7a1280629b39cd3fde54859ac (diff)
Correctly report high-S violations
Diffstat (limited to 'src/script/interpreter.cpp')
-rw-r--r--src/script/interpreter.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/script/interpreter.cpp b/src/script/interpreter.cpp
index a928223268..265131ae0d 100644
--- a/src/script/interpreter.cpp
+++ b/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) {