Skip to content

Commit 0a91568

Browse files
authored
fix: return false out of range (#47)
1 parent 83912c9 commit 0a91568

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

confidence-resolver/src/lib.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1081,6 +1081,9 @@ impl<'a, H: Host> AccountResolver<'a, H> {
10811081
}; // todo: would this match or not?
10821082
let salted_unit = self.client.account.salt_unit(unit)?;
10831083
let unit_hash = bucket(hash(&salted_unit), BUCKETS)?;
1084+
if unit_hash >= bitset.len() {
1085+
return Ok(false);
1086+
}
10841087
Ok(bitset[unit_hash])
10851088
}
10861089

0 commit comments

Comments
 (0)