[gnome-settings-daemon] print-notifications: detect malformed d-bus signals
- From: Marek KaÅÃk <mkasik src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-settings-daemon] print-notifications: detect malformed d-bus signals
- Date: Wed, 7 Dec 2011 15:18:33 +0000 (UTC)
commit 7d035a27f3f8c6056e96731ff9edafde9f785353
Author: Lars Uebernickel <lars uebernickel canonical com>
Date: Wed Dec 7 16:17:57 2011 +0100
print-notifications: detect malformed d-bus signals
Fixes a crash that happens when receiving a d-bus call with an invalid
number of arguments. The issue was first reported at lp #893676. A
patch to CUPS which makes it stop sending those malformed signals has
been submitted to cups.org as STR #3984. (#665689)
.../gsd-print-notifications-manager.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/plugins/print-notifications/gsd-print-notifications-manager.c b/plugins/print-notifications/gsd-print-notifications-manager.c
index 3a9adbe..65b2946 100644
--- a/plugins/print-notifications/gsd-print-notifications-manager.c
+++ b/plugins/print-notifications/gsd-print-notifications-manager.c
@@ -405,6 +405,10 @@ on_cups_notification (GDBusConnection *connection,
g_free (job_uri);
}
}
+ else {
+ g_warning ("Invalid number of parameters for signal '%s'", signal_name);
+ return;
+ }
if (g_strcmp0 (signal_name, "PrinterAdded") == 0) {
cupsFreeDests (manager->priv->num_dests, manager->priv->dests);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]