orc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From omalley <...@git.apache.org>
Subject [GitHub] orc pull request #309: ORC-403: [C++] Add checks to avoid invalid offsets in...
Date Mon, 17 Sep 2018 22:16:10 GMT
Github user omalley commented on a diff in the pull request:

    https://github.com/apache/orc/pull/309#discussion_r218244811
  
    --- 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 --
    
    This check is really good, but it would also be nice to check that the stream is within
the stripe, although you'd need to pass that in also. We could  pass the whole proto::StripeInformation
in.


---

Mime
View raw message