mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-04-08 20:28:55 +02:00
refactor: Avoid unsigned integer overflow in core_write
This commit is contained in:
parent
b79c40b057
commit
fa6065661a
@ -65,7 +65,7 @@ std::string FormatScript(const CScript& script)
|
||||
ret += strprintf("0x%x ", HexStr(std::vector<uint8_t>(it2, script.end())));
|
||||
break;
|
||||
}
|
||||
return ret.substr(0, ret.size() - 1);
|
||||
return ret.substr(0, ret.empty() ? ret.npos : ret.size() - 1);
|
||||
}
|
||||
|
||||
const std::map<unsigned char, std::string> mapSigHashTypes = {
|
||||
|
@ -47,7 +47,6 @@ unsigned-integer-overflow:arith_uint256.h
|
||||
unsigned-integer-overflow:common/bloom.cpp
|
||||
unsigned-integer-overflow:coins.cpp
|
||||
unsigned-integer-overflow:compressor.cpp
|
||||
unsigned-integer-overflow:core_write.cpp
|
||||
unsigned-integer-overflow:crypto/
|
||||
unsigned-integer-overflow:hash.cpp
|
||||
unsigned-integer-overflow:policy/fees.cpp
|
||||
|
Loading…
x
Reference in New Issue
Block a user