Skip to content

Commit ed7ac63

Browse files
authored
Fix UB in query-utils.cpp (#1411)
1 parent 531b6ce commit ed7ac63

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lite-client/query-utils.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,9 +181,9 @@ QueryInfo get_query_info(const lite_api::Function& f) {
181181
[&](const lite_api::liteServer_getBlockProof& q) {
182182
info.shard_id = ShardIdFull{masterchainId};
183183
BlockIdExt from = create_block_id(q.known_block_);
184-
BlockIdExt to = create_block_id(q.target_block_);
185184
// See LiteQuery::perform_getBlockProof
186185
if ((q.mode_ & 1) && (q.mode_ & 0x1000)) {
186+
BlockIdExt to = create_block_id(q.target_block_); // target_block is non-null if (mode & 1)
187187
info.type = QueryInfo::t_seqno;
188188
info.value = std::max(from.seqno(), to.seqno());
189189
} else {

0 commit comments

Comments
 (0)