You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucy.apache.org by "Marvin Humphrey (JIRA)" <ji...@apache.org> on 2016/03/14 22:44:33 UTC
[lucy-issues] [jira] [Created] (LUCY-294) Nul-terminate C strings in test code
Marvin Humphrey created LUCY-294:
------------------------------------
Summary: 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.4#6332)