[ 
https://issues.apache.org/jira/browse/LUCENE-8164?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16356301#comment-16356301
 ] 

Robert Muir commented on LUCENE-8164:
-------------------------------------

Actually the test is valid. You can add this:

{code:java}
LeafReader reader = getOnlyLeafReader(w.getReader());
assertTrue(reader.getFieldInfos().hasPayloads());
reader.close();
{code}

CannedTokenStream is confusing, but its working properly. Somehow this makes it 
all the way thru IW...

> IndexWriter silently accepts broken payload
> -------------------------------------------
>
>                 Key: LUCENE-8164
>                 URL: https://issues.apache.org/jira/browse/LUCENE-8164
>             Project: Lucene - Core
>          Issue Type: Bug
>            Reporter: Robert Muir
>            Priority: Major
>         Attachments: LUCENE-8164_test.patch
>
>
> IndexWriter seems to be missing bounds checks for payloads completely.
> If you pass a "broken" payload (e.g. BytesRef's offset + length is out of 
> bounds), it will silently index it as if nothing went wrong. What actually 
> happens? Doesn't matter, we should be getting an exception.
>  
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org

Reply via email to