Uploaded image for project: 'Lucy'
  1. Lucy
  2. LUCY-294

Nul-terminate C strings in test code

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • None
    • None
    • Test
    • None

    Description

      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.

      Attachments

        Activity

          People

            marvin Marvin Humphrey
            marvin Marvin Humphrey
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: