mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-19 13:27:35 +02:00
Merge feb162d500 into merged_master (Bitcoin PR #14696)
This commit is contained in:
commit
ca7b7f3810
9 changed files with 109 additions and 27 deletions
|
|
@ -345,7 +345,7 @@ bool EvalScript(std::vector<std::vector<unsigned char> >& stack, const CScript&
|
|||
opcode == OP_DIV ||
|
||||
opcode == OP_MOD
|
||||
) {
|
||||
return set_error(serror, SCRIPT_ERR_DISABLED_OPCODE); // Disabled opcodes.
|
||||
return set_error(serror, SCRIPT_ERR_DISABLED_OPCODE); // Disabled opcodes (CVE-2010-5137).
|
||||
}
|
||||
|
||||
// With SCRIPT_VERIFY_CONST_SCRIPTCODE, OP_CODESEPARATOR in non-segwit script is rejected even in an unexecuted branch
|
||||
|
|
@ -1886,6 +1886,8 @@ bool VerifyScript(const CScript& scriptSig, const CScript& scriptPubKey, const C
|
|||
return set_error(serror, SCRIPT_ERR_SIG_PUSHONLY);
|
||||
}
|
||||
|
||||
// scriptSig and scriptPubKey must be evaluated sequentially on the same stack
|
||||
// rather than being simply concatenated (see CVE-2010-5141)
|
||||
std::vector<std::vector<unsigned char> > stack, stackCopy;
|
||||
if (!EvalScript(stack, scriptSig, flags, checker, SigVersion::BASE, serror))
|
||||
// serror is set
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue