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

   ### What changes were proposed in this pull request?
   
   This PR aims to validate the ORC type tree in `createReader` when the footer 
comes from a serialized file tail (`ReaderOptions.setSerializedFileTail`), by 
calling the existing `checkProtoTypes` in the same way as the file-read path.
   
   ### Why are the changes needed?
   
   The serialized-file-tail branch of `createReader` builds `contents->footer` 
directly from the parsed `proto::FileTail` without validation. A malformed 
footer with an out-of-range or back-referencing subtype flows into 
`convertType`, causing an out-of-bounds read or unbounded recursion (stack 
overflow) in release builds.
   
   The file-read path already validates via `checkProtoTypes`, and the Java 
reader validates both tail paths (`OrcTail` and `ReaderImpl`). This closes the 
remaining C++ parity gap.
   
   ### How was this patch tested?
   
   Pass the CIs with a newly added test case.
   
   ### 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