Insecure code in dialog engine

The code used to format text for display in Strife's NPC dialog engine, which allows the player to make plot choices, buy items, and speak to other characters, is vulnerable in a number of ways to unexpected input patterns. These could result in crashing, infinite loops, and memory corruption side effects due to buffer overflows. The stock dialog lumps do not trigger any of these various problems, but editors creating new dialogs for a modification could easily trip some of them without a concerted effort.