mvanhorn opened a new pull request, #11859:
URL: https://github.com/apache/arrow-rs/pull/11859

   # Which issue does this PR close?
   
   - Closes #11851
   
   # Rationale for this change
   
   Validating a fixed-size list panics when length plus offset, multiplied by 
the list width, exceeds the largest address-sized integer. Array-data 
validation aborts the process. The expected child length is that product. 
checked_len_plus_offset already returns an error when the sum overflows. The 
following checked_mul(list_size) uses expect, so an overflowing product panics.
   
   When checked_mul returns None, validation returns 
ArrowError::InvalidArgumentError. The message names the data type, the 
length-plus-offset value, and the list size, and states that the product 
exceeds usize. The added test uses an empty child with no null buffer, checks 
two length and offset pairs whose product overflows, and checks a fitting 
product that reports the child as shorter than required.
   
   # What changes are included in this PR?
   
   Covered in the summary above.
   
   # Are these changes tested?
   
   cargo test -q --manifest-path arrow-data/Cargo.toml -p arrow-data reported 
86 passed and 0 failed.
   The same cargo test command reported 13 passed and 0 failed in the following 
suite.
   The same cargo test command ran the doctests.
   
   # Are there any significant user-facing changes?
   
   Covered in the summary above.
   
   AI was used for assistance.
   


-- 
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]

Reply via email to