mirror of
https://github.com/ton-blockchain/ton
synced 2025-02-15 04:32:21 +00:00
Fix UB in query-utils.cpp (#1411)
This commit is contained in:
parent
531b6ceccc
commit
ed7ac6312a
1 changed files with 1 additions and 1 deletions
|
@ -181,9 +181,9 @@ QueryInfo get_query_info(const lite_api::Function& f) {
|
||||||
[&](const lite_api::liteServer_getBlockProof& q) {
|
[&](const lite_api::liteServer_getBlockProof& q) {
|
||||||
info.shard_id = ShardIdFull{masterchainId};
|
info.shard_id = ShardIdFull{masterchainId};
|
||||||
BlockIdExt from = create_block_id(q.known_block_);
|
BlockIdExt from = create_block_id(q.known_block_);
|
||||||
BlockIdExt to = create_block_id(q.target_block_);
|
|
||||||
// See LiteQuery::perform_getBlockProof
|
// See LiteQuery::perform_getBlockProof
|
||||||
if ((q.mode_ & 1) && (q.mode_ & 0x1000)) {
|
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.type = QueryInfo::t_seqno;
|
||||||
info.value = std::max(from.seqno(), to.seqno());
|
info.value = std::max(from.seqno(), to.seqno());
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in a new issue