You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@orc.apache.org by "Zoltán Borók-Nagy (Jira)" <ji...@apache.org> on 2020/01/17 10:46:00 UTC

[jira] [Assigned] (ORC-589) [C++] ORC doesn't check for negative dictionary entry lengths anymore

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

Zoltán Borók-Nagy reassigned ORC-589:
-------------------------------------

    Assignee: Zoltán Borók-Nagy

> [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
>          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)