From 6b71268cb9c32f3e50f496aa7f82ef18655ce4be Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Tue, 15 Mar 2011 12:51:49 +0100 Subject: Workaround for bug #644792 - [mail-notify] Crash when sending D-Bus message --- plugins/mail-notification/mail-notification.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'plugins/mail-notification') diff --git a/plugins/mail-notification/mail-notification.c b/plugins/mail-notification/mail-notification.c index 8fc64f7da7..5cde1fbf69 100644 --- a/plugins/mail-notification/mail-notification.c +++ b/plugins/mail-notification/mail-notification.c @@ -126,6 +126,14 @@ send_dbus_message (const gchar *name, GVariantBuilder *builder; GError *error = NULL; + g_return_if_fail (name != NULL); + g_return_if_fail (data != NULL); + g_return_if_fail (g_utf8_validate (name, -1, NULL)); + g_return_if_fail (g_utf8_validate (data, -1, NULL)); + g_return_if_fail (msg_uid == NULL || g_utf8_validate (msg_uid, -1, NULL)); + g_return_if_fail (msg_sender == NULL || g_utf8_validate (msg_sender, -1, NULL)); + g_return_if_fail (msg_subject == NULL || g_utf8_validate (msg_subject, -1, NULL)); + /* Create a new message on the DBUS_INTERFACE */ if (!(message = g_dbus_message_new_signal (DBUS_PATH, DBUS_INTERFACE, name))) return; -- cgit v1.2.3