alamb opened a new pull request, #9816: URL: https://github.com/apache/arrow-rs/pull/9816
# Which issue does this PR close? - None. # Rationale for this change `ArrayData` validation used unchecked `usize` arithmetic when combining array lengths and offsets. In optimized builds, very large lengths could wrap these calculations and allow invalid `ArrayData` metadata to pass validation. # What changes are included in this PR? This adds checked arithmetic for length plus offset calculations in `ArrayData` validation, including offset-buffer validation and related typed-buffer sizing paths. # Are these changes tested? Yes. This adds regression coverage for overflowing offset-buffer and typed-buffer length calculations. Validated with: ```bash cargo test -p arrow-data overflow --release ``` # Are there any user-facing changes? Invalid `ArrayData` whose length and offset cannot be represented without overflow now returns an validation error consistently across build modes. There are no API changes. -- 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]
