fix config parsing: don't crash on truncated file or extra data at the end
Merge pull request #14 from r00t-/c-version

(c-version) fix config parsing: don't crash on truncated file or extra data at the end