Terminate string with '\0'

Fix CC #2150