When the value of the 'name_regexp' property is incorrect, the ini
parser can crash.
Pancake, of Radare2 fame, reported this one by email.
Fixed thus.
* src/abg-ini.cc (read_context::read_property_value): Do not
dereference a null pointer to list property value.
* tests/data/test-ini/test02-buggy-property-value.abignore: New
test input.
* tests/data/test-ini/test02-buggy-property-value.abignore.expected:
Likewise.
* tests/data/Makefile.am: Add the two new test inputs to source
distribution.
* tests/test-ini.cc (in_out_spec): Add the new test input pair to
this test harness.
Signed-off-by: Dodji Seketeli <dodji@redhat.com>
It appears that it's not possible to write a suppression specification
like the below at the moment:
[suppress_file]
label = Libabigail can't handle libgfortran.so (https://sourceware.org/bugzilla/show_bug.cgi?id=23492)
file_name_regexp = libgfortran\\.so.*
This is because the ini parser won't accept the '=' character in the
URL as a valid character for ini property values.
So the entire [suppress_file] section is ignored by the suppression
specification engine.
This patch fixes that by making the equal character valid in property
values.
* src/abg-ini.cc (char_is_delimiter): Take a new include_equal
flag to control is the equal character should be considered as a
delimiter or not.
(char_is_property_value_char): Accept the equal character as a
valid property value character.
* tests/Makefile.am: Build a new runtestini test from the new
tests/test-ini.cc source file.
* tests/data/Makefile.am: Add the two new test inputs below to
source distribution.
* tests/data/test-ini/test01-equal-in-property-string.{abignore,
abignore.expected}: New test inputs.
* tests/test-ini.cc: New test harness.
Signed-off-by: Dodji Seketeli <dodji@redhat.com>