You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@orc.apache.org by "dongjoon-hyun (via GitHub)" <gi...@apache.org> on 2026/07/08 22:21:06 UTC

[PR] ORC-2197: Reject negative decoded dictionary entry length in Java string dictionary reader [orc]

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

   ### What changes were proposed in this pull request?
   
   This PR aims to reject a negative decoded dictionary entry length in the Java string dictionary reader by throwing a `FileFormatException` in `StringDictionaryTreeReader.readDictionaryLengthStream`.
   
   ### Why are the changes needed?
   
   A corrupt file can encode a negative entry length in the LENGTH stream, making `dictionaryOffsets` non-monotonic and causing `setRef` to receive a negative length. The C++ reader already rejects this case (`DictionaryLoader.cc`), so this restores C++/Java reader parity.
   
   ### How was this patch tested?
   
   Pass the CIs with a newly added test case, `TestStringDictionaryTreeReader#testNegativeDictionaryEntryLength`.
   
   ### 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: issues-unsubscribe@orc.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] ORC-2197: Reject negative decoded dictionary entry length in Java string dictionary reader [orc]

Posted by "dongjoon-hyun (via GitHub)" <gi...@apache.org>.
dongjoon-hyun commented on PR #2680:
URL: https://github.com/apache/orc/pull/2680#issuecomment-4920359090

   Merged to main/2.3.


-- 
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: issues-unsubscribe@orc.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] ORC-2197: Reject negative decoded dictionary entry length in Java string dictionary reader [orc]

Posted by "dongjoon-hyun (via GitHub)" <gi...@apache.org>.
dongjoon-hyun closed pull request #2680: ORC-2197: Reject negative decoded dictionary entry length in Java string dictionary reader
URL: https://github.com/apache/orc/pull/2680


-- 
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: issues-unsubscribe@orc.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org