If there is an invalid line of text at the start of the .ini file
before the first [global] section has been parsed in u_parse_ini(),
then the "section" pointer is still NULL and trying to print it in
the error message results in a segfault. Avoid the NULL section.
Running "./io500 --list > config-new.ini" would result in the line
"Supported and current values of the ini file:" being included at
the start of the .ini file, which triggered this segfault. Print
this line as a comment so that this works as one would expect.
If there is an invalid line of text at the start of the .ini file before the first [global] section has been parsed in u_parse_ini(), then the "section" pointer is still NULL and trying to print it in the error message results in a segfault. Avoid the NULL section.
Running "./io500 --list > config-new.ini" would result in the line "Supported and current values of the ini file:" being included at the start of the .ini file, which triggered this segfault. Print this line as a comment so that this works as one would expect.
Signed-off-by: Andreas Dilger adilger@dilger.ca