Skip to content

Commit

Permalink
Verify fields recursively
Browse files Browse the repository at this point in the history
Add test cases
  • Loading branch information
joii2020 authored and XuJiandong committed Mar 18, 2024
1 parent eb5c489 commit 47f6fb7
Show file tree
Hide file tree
Showing 4 changed files with 702 additions and 14 deletions.
4 changes: 4 additions & 0 deletions bindings/rust/src/lazy_reader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,10 @@ impl Cursor {
self.verify_dynvec()?;
let mut cur = self.clone();
cur.add_offset(NUMBER_SIZE)?;
if self.size == cur.size {
// empty table
return Ok(());
}
let first_offset = cur.unpack_number()?;
let field_count = first_offset / NUMBER_SIZE - 1;
if field_count < expected_field_count {
Expand Down
Loading

0 comments on commit 47f6fb7

Please sign in to comment.