INSANE: Fix potential buffer overflow. CID 1003866
TESTBED: Fix memory leak. CID 1003583
GUI: Add sanity check to config format. CID 1004153