These tests were originally written using the output directly from a
fuzzer which had triggered the bugs we’re testing for. However, that
means they’re liable to no longer test what they’re intended to test if
GDBusMessage parsing code is changed to (for example) check for
certain errors earlier in future.
It’s better to only have one invalidity in each binary blob, so change the test messages to all be valid apart from the specific thing they’re testing for.
The changes were based on reading the D-Bus specification directly: https://dbus.freedesktop.org/doc/dbus-specification.html
During these changes I found one problem in
test_message_parse_deep_header_nesting() where it wasn’t actually
nesting variants in the header deeply enough to trigger the bug it was
supposed to be testing for. Fixed that.
Signed-off-by: Philip Withnall firstname.lastname@example.org
Fixes: #1963 (closed)