summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTill Kamppeter <till.kamppeter@gmail.com>2014-03-05 19:02:38 +0100
committerTill Kamppeter <till.kamppeter@gmail.com>2014-03-05 19:02:38 +0100
commitc4ac127064b2b9c7ada03990d93417a75d1e02c8 (patch)
tree1e590284b0392e0146c50b9d988d0f0f7f062d6b
parent0bf58080661c2819fe64bf291a1942f8d20b09ea (diff)
downloadcups-c4ac127064b2b9c7ada03990d93417a75d1e02c8.tar.gz
Fix crash bug in the cupsEnumDests() function (CUPS STR #4380).
-rw-r--r--debian/patches/cupsenumdests-does-not-set-cb.patch25
-rw-r--r--debian/patches/series1
2 files changed, 26 insertions, 0 deletions
diff --git a/debian/patches/cupsenumdests-does-not-set-cb.patch b/debian/patches/cupsenumdests-does-not-set-cb.patch
new file mode 100644
index 00000000..8548a05d
--- /dev/null
+++ b/debian/patches/cupsenumdests-does-not-set-cb.patch
@@ -0,0 +1,25 @@
+Description: Let the cupsEnumDests() function correctly set "cb" and
+ "user_data" in the context data structure, to avoid crashes and hangs
+ of print dialogs
+Author: Michael Sweet <msweet@apple.com>
+Bug: https://cups.org/str.php?L4380
+Last-Update: 2014-03-05
+--- a/cups/dest.c
++++ b/cups/dest.c
+@@ -953,11 +953,11 @@
+ * Get Bonjour-shared printers...
+ */
+
+- data.type = type;
+- data.mask = mask;
+- data.devices = cupsArrayNew3((cups_array_func_t)cups_dnssd_compare_devices,
+- NULL, NULL, 0, NULL,
+- (cups_afree_func_t)cups_dnssd_free_device);
++ data.type = type;
++ data.mask = mask;
++ data.cb = cb;
++ data.user_data = user_data;
++ data.devices = cupsArrayNew3((cups_array_func_t)cups_dnssd_compare_devices, NULL, NULL, 0, NULL, (cups_afree_func_t)cups_dnssd_free_device);
+
+ # ifdef HAVE_DNSSD
+ if (DNSServiceCreateConnection(&data.main_ref) != kDNSServiceErr_NoError)
diff --git a/debian/patches/series b/debian/patches/series
index f206f7b7..70765604 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,4 +1,5 @@
# patches accepted and committed upstream:
+cupsenumdests-does-not-set-cb.patch
cupsd-support-avahi-daemon-restarting.patch
prevent-dnssd-backend-exiting-too-early.patch
fix-a-dbus-threading-issue-that-caused-the-scheduler-to-crash.patch