[ 
https://issues.apache.org/jira/browse/ORC-589?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Zoltán Borók-Nagy resolved ORC-589.
-----------------------------------
    Fix Version/s: 1.7.0
                   1.6.3
       Resolution: Fixed

> [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
>            Assignee: Zoltán Borók-Nagy
>            Priority: Major
>             Fix For: 1.6.3, 1.7.0
>
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> 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)

Reply via email to