mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-06-28 01:41:57 +02:00
Fix unsigned integer overflows in interpreter
This commit is contained in:
parent
fc642c33ef
commit
bbbbaa0d9a
@ -51,8 +51,8 @@ bool CastToBool(const valtype& vch)
|
|||||||
* Script is a stack machine (like Forth) that evaluates a predicate
|
* Script is a stack machine (like Forth) that evaluates a predicate
|
||||||
* returning a bool indicating valid or not. There are no loops.
|
* returning a bool indicating valid or not. There are no loops.
|
||||||
*/
|
*/
|
||||||
#define stacktop(i) (stack.at(stack.size()+(i)))
|
#define stacktop(i) (stack.at(size_t(int64_t(stack.size()) + int64_t{i})))
|
||||||
#define altstacktop(i) (altstack.at(altstack.size()+(i)))
|
#define altstacktop(i) (altstack.at(size_t(int64_t(altstack.size()) + int64_t{i})))
|
||||||
static inline void popstack(std::vector<valtype>& stack)
|
static inline void popstack(std::vector<valtype>& stack)
|
||||||
{
|
{
|
||||||
if (stack.empty())
|
if (stack.empty())
|
||||||
|
@ -55,7 +55,6 @@ unsigned-integer-overflow:MurmurHash3
|
|||||||
unsigned-integer-overflow:CBlockPolicyEstimator::processBlockTx
|
unsigned-integer-overflow:CBlockPolicyEstimator::processBlockTx
|
||||||
unsigned-integer-overflow:TxConfirmStats::EstimateMedianVal
|
unsigned-integer-overflow:TxConfirmStats::EstimateMedianVal
|
||||||
unsigned-integer-overflow:prevector.h
|
unsigned-integer-overflow:prevector.h
|
||||||
unsigned-integer-overflow:EvalScript
|
|
||||||
unsigned-integer-overflow:InsecureRandomContext::rand64
|
unsigned-integer-overflow:InsecureRandomContext::rand64
|
||||||
unsigned-integer-overflow:InsecureRandomContext::SplitMix64
|
unsigned-integer-overflow:InsecureRandomContext::SplitMix64
|
||||||
unsigned-integer-overflow:bitset_detail::PopCount
|
unsigned-integer-overflow:bitset_detail::PopCount
|
||||||
|
Loading…
x
Reference in New Issue
Block a user