From 5f723304defa49b50a3e2bdb6e9722d9fa3db987 Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Tue, 5 Apr 2011 15:49:18 +0100 Subject: [PATCH 09/15] export_signals: check interface, signal names for validity --- dbus/dbus-gobject.c | 14 ++++++++++++++ 1 files changed, 14 insertions(+), 0 deletions(-) diff --git a/dbus/dbus-gobject.c b/dbus/dbus-gobject.c index 3baa860..08ddd0e 100644 --- a/dbus/dbus-gobject.c +++ b/dbus/dbus-gobject.c @@ -2316,6 +2316,20 @@ export_signals (DBusGConnection *connection, const GList *info_list, GObject *ob sigdata = signal_iterate (sigdata, &iface, &signame); + if (!g_dbus_is_interface_name (iface)) + { + g_critical ("invalid interface name found in %s: %s", + g_type_name (gtype), iface); + continue; + } + + if (!g_dbus_is_member_name (signame)) + { + g_critical ("invalid signal name found in %s: %s", + g_type_name (gtype), signame); + continue; + } + s = _dbus_gutils_wincaps_to_uscore (signame); id = g_signal_lookup (s, gtype); -- 1.7.4.1