Github user stiga-huang commented on a diff in the pull request:
https://github.com/apache/orc/pull/309#discussion_r218442570
--- Diff: c++/src/Reader.cc ---
@@ -498,6 +498,12 @@ namespace orc {
const proto::Stream& stream = currentStripeFooter.streams(i);
uint64_t length = static_cast<uint64_t>(stream.length());
if (static_cast<StreamKind>(stream.kind()) ==
StreamKind::StreamKind_ROW_INDEX) {
+ if (offset + length > fileLength) {
--- End diff --
Yes! I'll add more strict checks.---
