2 ms·
> If there is a length field, it will keep reading until the length is reached. Well, it might. If it ever uses that string internally with some function that
by taneq 7y ago
> If there is a length field, it will keep reading until the length is reached.
Well, it might. If it ever uses that string internally with some function that expects a null termination then it'll probably still get truncated.
- kstenerud 7y agoPossibly, depending on the API. But then again, strings should not have embedded NUL characters. There's no good reason for it. You have 32 other control characters to choose from.