mirror of
https://github.com/ton-blockchain/ton
synced 2025-03-09 15:40:10 +00:00
Validate Merkle proofs and updates in TLB validate (#1479)
* Validate Merkle proofs and updates in TLB validate * Fix out-of-bound access in tl_jni_object.cpp
This commit is contained in:
parent
987c7ca04b
commit
710514b8f1
4 changed files with 11 additions and 4 deletions
|
@ -133,7 +133,13 @@ bool TLB::validate_ref_internal(int* ops, Ref<vm::Cell> cell_ref, bool weak) con
|
|||
}
|
||||
bool is_special;
|
||||
auto cs = load_cell_slice_special(std::move(cell_ref), is_special);
|
||||
return always_special() ? is_special : (is_special ? weak : (validate_skip(ops, cs) && cs.empty_ext()));
|
||||
if (cs.special_type() == vm::Cell::SpecialType::PrunnedBranch && weak) {
|
||||
return true;
|
||||
}
|
||||
if (always_special() != is_special) {
|
||||
return false;
|
||||
}
|
||||
return validate_skip(ops, cs, weak) && cs.empty_ext();
|
||||
}
|
||||
|
||||
bool TLB::print_skip(PrettyPrinter& pp, vm::CellSlice& cs) const {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue