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

Daniel Becker updated IMPALA-12478:
-----------------------------------
    Description: 
In StringValue::LeastSmallerString() we do not check if 'len' is 0 before 
subtracting 1 from it. The resulting, possibly negative value is later used as 
the length of a new string.

See 
[https://github.com/apache/impala/blob/ae14d78c8f2e8366e67aa8c39f0c02c60862905e/be/src/runtime/string-value.cc#L51]

Also, the name of the function should actually be LargestSmallerString(), cf. 
LeastLargerString().

  was:
In StringValue::LeastSmallerString() we don not check if 'len' is 0 before 
subtracting 1 from it. The resulting, possibly negative value is later used as 
the length of a new string.

See 
https://github.com/apache/impala/blob/ae14d78c8f2e8366e67aa8c39f0c02c60862905e/be/src/runtime/string-value.cc#L51


> Invalid length in StringValue::LeastSmallerString()
> ---------------------------------------------------
>
>                 Key: IMPALA-12478
>                 URL: https://issues.apache.org/jira/browse/IMPALA-12478
>             Project: IMPALA
>          Issue Type: Bug
>          Components: Backend
>            Reporter: Daniel Becker
>            Assignee: Daniel Becker
>            Priority: Major
>
> In StringValue::LeastSmallerString() we do not check if 'len' is 0 before 
> subtracting 1 from it. The resulting, possibly negative value is later used 
> as the length of a new string.
> See 
> [https://github.com/apache/impala/blob/ae14d78c8f2e8366e67aa8c39f0c02c60862905e/be/src/runtime/string-value.cc#L51]
> Also, the name of the function should actually be LargestSmallerString(), cf. 
> LeastLargerString().



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to