31 lines
1.3 KiB
Diff
31 lines
1.3 KiB
Diff
From cbc5ab2ae34643775c980228d56f6b800f606b96 Mon Sep 17 00:00:00 2001
|
|
From: Lars Uebernickel <lars.uebernickel@canonical.com>
|
|
Date: Wed, 7 Dec 2011 16:21:38 +0100
|
|
Subject: [PATCH] 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 96285bc..fc557a1 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);
|
|
--
|
|
1.7.8
|
|
|