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

   # Which issue does this PR close?
   
   - None.
   
   # Rationale for this change
   
   BufferBuilder reserve paths could rely on unchecked usize arithmetic when 
calculating the required byte length. In optimized builds, very large requested 
lengths could wrap before capacity growth.
   
   # What changes are included in this PR?
   
   This adds checked arithmetic for MutableBuffer byte length calculations used 
by reserve and zero-extension paths.
   
   # Are these changes tested?
   
   Yes. This adds regression coverage for overflowing BufferBuilder length 
calculations through reserve, append_n_zeroed, and advance.
   
   # Are there any user-facing changes?
   
   Invalid requested lengths whose byte size 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