Skip to content

Commit

Permalink
check key len
Browse files Browse the repository at this point in the history
  • Loading branch information
olga24912 committed Nov 7, 2023
1 parent 06760f2 commit 3d8de1a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion contracts/near/eth-prover/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,8 @@ impl EthProver {
}
} else {
// Extension node
if path.as_slice() == &key[key_index..key_index + path.len()] {
if key_index + path.len() <= key.len() &&
path.as_slice() == &key[key_index..key_index + path.len()] {
let new_expected_root = get_vec(&node, 1);
Self::_verify_trie_proof(
new_expected_root,
Expand Down

0 comments on commit 3d8de1a

Please sign in to comment.