Skip to content

Commit 49ddb6a

Browse files
rapourclaude
andcommitted
fix: pass the upper buffer to the codec's validate_layout
`validate_layout` now takes the upper buffer and checks its size, so pass it from the array's validation. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: rapour <reza.apour@gmail.com>
1 parent f9f09a0 commit 49ddb6a

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

‎encodings/elias-fano/src/array.rs‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -636,12 +636,13 @@ fn validate_parts(
636636
);
637637

638638
// Everything below is codec geometry, re-derived from `(span, n)` alone: the widths, the upper
639-
// length, both sample counts, and every sample's range and order.
639+
// length and buffer size, both sample counts, and every sample's range and order.
640640
ef::validate_layout(
641641
data.span(),
642642
lower.len(),
643643
data.lower_width(),
644644
data.upper_len(),
645+
data.upper_buffer().as_slice(),
645646
data.samples_buffer().as_slice(),
646647
)
647648
.map_err(malformed)

0 commit comments

Comments
 (0)