dongjoon-hyun opened a new pull request, #2674:
URL: https://github.com/apache/orc/pull/2674

   ### What changes were proposed in this pull request?
   
   This PR makes the encrypted `FileStatistics` parsing path in the Java reader 
consistent with all other protobuf parse paths by wrapping it with 
`InStream.createCodedInputStream(...)`.
   
   ```java
   // Before
   OrcProto.FileStatistics decrypted = OrcProto.FileStatistics.parseFrom(in);
   // After
   OrcProto.FileStatistics decrypted =
       OrcProto.FileStatistics.parseFrom(InStream.createCodedInputStream(in));
   ```
   
   ### Why are the changes needed?
   
   Every other protobuf parse path in the reader (footer, metadata, stripe 
footer, row index, bloom filter, columnar stripe stats) goes through 
`createCodedInputStream`, which applies `setSizeLimit(1 GB)`. This was the only 
exception, so this aligns it for consistency. It is not a security fix: the 
input is an already-bounded in-memory sub-message from the footer.
   
   ### How was this patch tested?
   
   Existing tests, all green (`TestReaderImpl`, `TestEncryption`, 
`TestReaderEncryptionVariant`, and encrypted round-trips in 
`TestVectorOrcFile`):
   
   ```bash
   cd java && ./mvnw -q -pl core test
   ```
   
   ### Was this patch authored or co-authored using generative AI tooling?
   
   Generated-by: Claude Fable 5


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