From a119541e4aef2f98c6bd46cbcd70340cbdd98d75 Mon Sep 17 00:00:00 2001 From: "sanghyeok.oh" Date: Wed, 8 Aug 2018 11:47:31 +0900 Subject: [PATCH] kdbus: svace fix Change-Id: I5618c10d9c6c2daa6cbd9c8285becf154d667c44 Signed-off-by: sanghyeok.oh --- gio/gkdbus.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/gio/gkdbus.c b/gio/gkdbus.c index ba12aa7..24f2f3a 100755 --- a/gio/gkdbus.c +++ b/gio/gkdbus.c @@ -2161,6 +2161,18 @@ _g_kdbus_subscribe_name_acquired (GKDBusWorker *worker, return FALSE; } + if (name != NULL) + { + if (!g_dbus_is_name (name)) + { + g_set_error (error, + G_DBUS_ERROR, + G_DBUS_ERROR_MATCH_RULE_INVALID, + "Invalid rule: %s", match_rule); + return FALSE; + } + } + match = match_new (match_rule); if (!match) { @@ -2244,6 +2256,18 @@ _g_kdbus_subscribe_name_lost (GKDBusWorker *worker, return FALSE; } + if (name != NULL) + { + if (!g_dbus_is_name (name)) + { + g_set_error (error, + G_DBUS_ERROR, + G_DBUS_ERROR_MATCH_RULE_INVALID, + "Invalid rule: %s", match_rule); + return FALSE; + } + } + match = match_new (match_rule); if (!match) { -- 2.7.4