The string generated from the call to AP4_ByteStream::ReadNullTerminatedString has an extra null and the string length has + 1 in length. It is because of this logic

```
    AP4_DataBuffer buffer;
    unsigned int   size = 0;
    AP4_UI08       c = 0;
    do {
        AP4_Result result = ReadUI08(c);
        if (AP4_FAILED(result)) return result;
        buffer.SetDataSize(size+1);
        buffer.UseData()[size] = c;
        ++size;
    } while (c);

    string.Assign((const char*)buffer.GetData(), size);
```

And it should have been

```
    string.Assign((const char*)buffer.GetData(), size - 1);
```
since size counts the null terminator too.
String length not set correctly in AP4_ByteStream::ReadNullTerminatedString
This is a GitHub Issue
repo:Bento4
owner:axiomatic-systems
Title : String length not set correctly in AP4_ByteStream::ReadNullTerminatedString
Issue date:

--- start body ---
The string generated from the call to AP4_ByteStream::ReadNullTerminatedString has an extra null and the string length has + 1 in length. It is because of this logic

```
    AP4_DataBuffer buffer;
    unsigned int   size = 0;
    AP4_UI08       c = 0;
    do {
        AP4_Result result = ReadUI08(c);
        if (AP4_FAILED(result)) return result;
        buffer.SetDataSize(size+1);
        buffer.UseData()[size] = c;
        ++size;
    } while (c);

    string.Assign((const char*)buffer.GetData(), size);
```

And it should have been

```
    string.Assign((const char*)buffer.GetData(), size - 1);
```
since size counts the null terminator too.
--- end body ---

None