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

Adrien Grand updated LUCENE-7956:
---------------------------------
    Attachment: LUCENE-7956.patch

Here is a patch
 - Recursion has been replaced with a while loop
 - It uses CharacterUtils, which is aware of supplementary chars, in order to 
fill the buffer. This helps avoid loading more data in memory in the case that 
the last char in the buffer is a surrogate.

> ICUNormalizer2CharFilter may fail with a StackOverFlow error
> ------------------------------------------------------------
>
>                 Key: LUCENE-7956
>                 URL: https://issues.apache.org/jira/browse/LUCENE-7956
>             Project: Lucene - Core
>          Issue Type: Bug
>            Reporter: Adrien Grand
>            Priority: Minor
>         Attachments: LUCENE-7956.patch
>
>
> ICUNormalizer2CharFilter recursively fills up a buffer of 128 chars until the 
> last char is neither a surrogate nor inert. On large inputs of non inert 
> characters, this can cause a stack overflow error.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

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

Reply via email to