txtinfo: prevent buffer overflow