aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/mail-notification/mail-notification.c
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2011-03-15 19:51:49 +0800
committerMilan Crha <mcrha@redhat.com>2011-03-15 19:51:49 +0800
commit40346a792f01a9477507fbbdd25a45a661adb4ca (patch)
tree0941cf3bc17d26978d4eab981c67832339f09a65 /plugins/mail-notification/mail-notification.c
parent3df6594023782ff0c45a0debaf3e237a2e9c50b9 (diff)
downloadgsoc2013-evolution-40346a792f01a9477507fbbdd25a45a661adb4ca.tar.gz
gsoc2013-evolution-40346a792f01a9477507fbbdd25a45a661adb4ca.tar.zst
gsoc2013-evolution-40346a792f01a9477507fbbdd25a45a661adb4ca.zip
Workaround for bug #644792 - [mail-notify] Crash when sending D-Bus message
Diffstat (limited to 'plugins/mail-notification/mail-notification.c')
-rw-r--r--plugins/mail-notification/mail-notification.c8
1 files changed, 8 insertions, 0 deletions
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;