You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
FixedSizeBinaryBuilder::append_value accepts values whose length differs from value_length by a multiple of 2^32 #12285
FixedSizeBinaryBuilder::append_value compares self.value_length != value.as_ref().len() as i32 (fixed_size_binary_builder.rs). The as i32 cast truncates, so a slice whose length is value_length + k * 2^32 passes the check. The builder then appends every byte of it but counts one value. Later values read from the wrong position, and value_data() is longer than len * value_length, which violates the FixedSizeBinaryArray::new_unchecked contract that finish relies on. With force_validate, finish panics instead.
To Reproduce
This needs about 8 GiB of memory.
letmut b = FixedSizeBinaryBuilder::new(1);let big = vec![0u8;(1usize << 32) + 1];assert!(b.append_value(&big).is_err());// currently Ok
Expected behavior
append_value should return an error for any slice whose length isn't value_length. Comparing as usize fixes it: value.as_ref().len() != self.value_length as usize. with_capacity already asserts value_length >= 0, so the cast is lossless.
Activity
Surajsuthar commentedon Nov 17, 2026
take
fix(arrow-array): validate FixedSizeBinaryBuilder value length withou…