The null terminator can be truncated, if the string is longer than given buffer.