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

   # Which issue does this PR close?
   
   - Closes #11954
   
   # Rationale for this change
   
   `SchemaElement.num_children` comes from untrusted footer data and was used 
to reserve a vector before checking whether that many schema elements exist. 
Rejecting impossible counts makes malformed input return a `ParquetError` 
instead of attempting an oversized allocation. The row-group count path is 
already guarded on current `main`; this change covers the remaining schema path.
   
   # What changes are included in this PR?
   
   The declared child count is checked against the remaining schema elements 
before capacity is reserved. A regression test covers `i32::MAX` children with 
no elements remaining.
   
   AI disclosure: AI assistance was used to analyse the issue and draft the 
validation guard and regression test.
   
   # Are these changes tested?
   
   The full workspace test suite and doctests passed locally. Parquet’s unit 
tests had 1,487 passes and one existing ignored test that allocates about 2 
GiB. Workspace Clippy, formatting and spelling checks passed. The macOS run 
used a temporary path override for the installed Command Line Tools Python 
framework.
   
   # Are there any significant user-facing changes?
   
   Malformed schemas with impossible child counts now return a `ParquetError` 
instead of attempting an allocation. There is no public API change.
   


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