Memory safety for Config.cpp

Avoid trivial buffer overflows.