INI: Fix ini_config parsing SEGVs
When a config file has a conflict between a section
name and a key name, ini_parse can create malformed
collections, leading to a segfault. There are three
cases where this occurs:
1. Inside a section, between the section name
and the key name
2. Between a default-section key and a section
name
3. Between a section name and a key in a
different section
Case 1 leads to a segfault only when retrieving
the attribute from a value_obj, as the value_obj
returned is incorrectly cast from the section. Case
2 and 3 segfaults during parsing, when it attempts
to merge the section and the key.
Signed-off-by: Alexander Scheel <ascheel@redhat.com>
Reviewed-by: Michal Židek <mzidek@redhat.com>