mirror of
https://github.com/ton-blockchain/ton
synced 2025-03-09 15:40:10 +00:00
Fix undefined behavior code (#464)
* Fix UB in arithmetics * Fix misaligned allocations in validator sessions * Fix integer overflow in bigint.hpp * Fix potential UB Co-authored-by: SpyCheese <mikle98@yandex.ru>
This commit is contained in:
parent
440d06962a
commit
9c6787d2ff
8 changed files with 86 additions and 71 deletions
|
@ -982,7 +982,7 @@ struct ShardIdent::Record {
|
|||
int shard_pfx_bits;
|
||||
int workchain_id;
|
||||
unsigned long long shard_prefix;
|
||||
Record() : shard_pfx_bits(-1) {
|
||||
Record() : shard_pfx_bits(-1), workchain_id(ton::workchainInvalid), shard_prefix(0) {
|
||||
}
|
||||
Record(int _pfxlen, int _wcid, unsigned long long _pfx)
|
||||
: shard_pfx_bits(_pfxlen), workchain_id(_wcid), shard_prefix(_pfx) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue