[Utils] Fix a bug that passes a string without null terminator to the constructor of string().