txtinfo: ensure null termination of string buffer