Zoltán Borók-Nagy created ORC-589:
-------------------------------------
Summary: [C++] ORC doesn't check for negative dictionary entry
lengths anymore
Key: ORC-589
URL: https://issues.apache.org/jira/browse/ORC-589
Project: ORC
Issue Type: Bug
Reporter: Zoltán Borók-Nagy
The constructor of StringDictionaryColumnReader used to have a check for
negative dictionary entry lengths:
[https://github.com/apache/orc/blob/branch-1.5/c%2B%2B/src/ColumnReader.cc#L523-L524]
{noformat}
for (uint64_t i = 1; i < dictionaryCount + 1; ++i) {
if (lengthArray[i] < 0)
throw ParseError("Negative dictionary entry length");
lengthArray[i] += lengthArray[i - 1];
}{noformat}
However we don't have it on current master. It causes a problem because it will
use a negative value (casted to unsigned) to allocate a DataBuffer:
{noformat}
dictionary->dictionaryBlob.resize(static_cast<uint64_t>(lengthArray[dictSize]))
{noformat}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)