Description
A malformed ORC file may have a postscript length larger than the file size, which causes orc:: readPostscript to read unexpected data.
std::unique_ptr<proto::PostScript> postscript = std::unique_ptr<proto::PostScript>(new proto::PostScript()); if (!postscript->ParseFromArray(ptr + readSize - 1 - postscriptSize, static_cast<int>(postscriptSize))) { throw ParseError("Failed to parse the postscript from " + stream->getName()); }
We should make sure readSize - 1 - postscriptSize >= 0. Furthermore, we should check offsets and lengths got from protobuf Objects.
Attachments
Attachments
Issue Links
- is related to
-
IMPALA-6772 Enable test_scanners_fuzz for ORC format
- Resolved
- links to