Fix off-by-one misallocation, and truly null-terminate ConfigStream in InitConfig().