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

Nick Wellnhofer resolved LUCY-294.
----------------------------------
    Resolution: Fixed

This should have been fixed in Clownfish. Strings created with CharBuf are 
always nul-terminated now.

> Nul-terminate C strings in test code
> ------------------------------------
>
>                 Key: LUCY-294
>                 URL: https://issues.apache.org/jira/browse/LUCY-294
>             Project: Lucy
>          Issue Type: Bug
>          Components: Test
>            Reporter: Marvin Humphrey
>            Assignee: Marvin Humphrey
>            Priority: Minor
>
> The behavior of String's `Get_Ptr8` method has changed: it now consistently 
> returns a memory buffer which is not nul-terminated.
> Lucy uses `Get_Ptr8` in numerous places.  All of the runtime usages are OK, 
> but there are a number of test cases that improperly assume that it returns a 
> nul-terminated C string.
> The solution is to use `To_Utf8` instead, which returns a newly allocated 
> nul-terminated buffer.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to