74396a6 INI: Fix ini_config parsing SEGVs

2 files Authored by cipherboy 6 years ago, Committed by mzidek 6 years ago,
    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>
    
        
file modified
+1 -0
file modified
+1 -1