tests/gdbus-method-invocation: Fix missing g_variant_new() argument

I noticed this when running the test on an Arm Morello system where varargs
have bounds. g_variant_new() was trying to read an integer using va_arg(),
but since there was no argument it resulted in a bounds errors there.
On most other architectures this will just read whatever value is contained
in the next argument register and is not something that ASan can detect, so
it never resulted in test failures.
This commit is contained in:
Alex Richardson 2022-12-13 14:58:04 +00:00
parent ded3099afc
commit 994f96fb2b

View File

@ -251,7 +251,7 @@ test_method_invocation_return_method_call (GDBusConnection *connection,
if (g_str_equal (action, "Valid") ||
g_str_equal (action, "WrongNumber"))
g_dbus_method_invocation_return_value_with_unix_fd_list (invocation, g_variant_new ("(h)"), list);
g_dbus_method_invocation_return_value_with_unix_fd_list (invocation, g_variant_new ("(h)", 0), list);
else
g_assert_not_reached ();