Skip to content

gdbusconnection: Fix a crash on arg0 matching

Philip Withnall requested to merge pwithnall/glib:3342-arg0-match-crash into main

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)

Merge request reports