Skip to content

Backport !4028 “gdbusconnection: Fix a crash on arg0 matching” to glib-2-78

If a connection has two signal subscriptions active for the same signal, one with arg0 matching and one without, a signal which doesn’t contain an arg0 value (i.e. g_dbus_message_get_arg0() returns NULL) will cause NULL to be passed to strcmp() when checking for a match against the signal subscription which has arg0 matching, causing a crash.

Fix that by adding the obvious NULL check, and add a unit test.

Signed-off-by: Philip Withnall pwithnall@gnome.org

Fixes: #3342 (closed)


Trivial backport of !4028 (merged) to glib-2-78.

Merge request reports