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

   # Which issue does this PR close?
   
   - None.
   
   # Rationale for this change
   
   MutableBuffer repeated slices used unchecked usize arithmetic when 
calculating the number of bytes to reserve. In optimized builds, very large 
repeat counts could wrap the capacity calculation before copying repeated bytes.
   
   # What changes are included in this PR?
   
   This adds checked arithmetic for repeated slice byte length validation 
before reserving capacity and copying repeated data.
   
   # Are these changes tested?
   
   Yes. This adds regression coverage for overflowing repeated slice length 
calculations.
   
   # Are there any user-facing changes?
   
   Invalid repeat counts whose requested byte length cannot be represented 
without overflow now panic consistently. 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]

Reply via email to