1
0
Fork 0
mirror of https://github.com/ton-blockchain/ton synced 2025-02-14 12:12:21 +00:00

Fix UB in query-utils.cpp (#1411)

This commit is contained in:
SpyCheese 2024-12-03 10:02:51 +03:00 committed by GitHub
parent 531b6ceccc
commit ed7ac6312a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -181,9 +181,9 @@ QueryInfo get_query_info(const lite_api::Function& f) {
[&](const lite_api::liteServer_getBlockProof& q) {
info.shard_id = ShardIdFull{masterchainId};
BlockIdExt from = create_block_id(q.known_block_);
BlockIdExt to = create_block_id(q.target_block_);
// See LiteQuery::perform_getBlockProof
if ((q.mode_ & 1) && (q.mode_ & 0x1000)) {
BlockIdExt to = create_block_id(q.target_block_); // target_block is non-null if (mode & 1)
info.type = QueryInfo::t_seqno;
info.value = std::max(from.seqno(), to.seqno());
} else {