kawadakk opened a new issue, #4620: URL: https://github.com/apache/arrow-rs/issues/4620
**Describe the bug** Bounds checking in `MutableBuffer::set_null_bits` can be bypassed by triggering an integer overflow, breaking [the safety guarantees](https://docs.rs/arrow/44.0.0/arrow/index.html#safety-and-security). **To Reproduce** ```rust fn main() { let mut buf = arrow::buffer::MutableBuffer::new(0); buf.set_null_bits(1, usize::MAX); } ``` ```console $ cargo run --release --quiet fish: Job 2, 'cargo run --release --quiet' terminated by signal SIGSEGV (Address boundary error) ``` **Expected behavior** Avoiding undefined behaviour by panicking, aborting, or silently saturating a given range. **Additional context** <!-- Add any other context about the problem here. --> -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
