summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon McVittie <simon.mcvittie@collabora.co.uk>2011-04-05 15:50:38 +0100
committerSimon McVittie <simon.mcvittie@collabora.co.uk>2011-08-17 19:19:01 +0100
commit22262581b0956f69f321b9e2eb702e3f15b49823 (patch)
treee2d93386b9731bce86f71c8c069205c04a429d5d
parentcccf1e6672fba6b649fe02082c2f087cdf022dcd (diff)
emit_signal_for_registration: assert that signal headers are all valid
This is an assertion, not a return_if_fail, because we already checked the object path in dbus_g_connection_register_g_object and the others in export_signals. After these checks, dbus_message_new_signal can really only fail on OOM. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=35766 Reviewed-by: Cosimo Alfarano <cosimo.alfarano@collabora.co.uk>
-rw-r--r--dbus/dbus-gobject.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/dbus/dbus-gobject.c b/dbus/dbus-gobject.c
index 4b1c007..74deef0 100644
--- a/dbus/dbus-gobject.c
+++ b/dbus/dbus-gobject.c
@@ -2253,6 +2253,10 @@ emit_signal_for_registration (ObjectRegistration *o,
DBusMessageIter iter;
guint i;
+ g_assert (g_variant_is_object_path (o->object_path));
+ g_assert (g_dbus_is_interface_name (sigclosure->sigiface));
+ g_assert (g_dbus_is_member_name (sigclosure->signame));
+
signal = dbus_message_new_signal (o->object_path,
sigclosure->sigiface,
sigclosure->signame);