summaryrefslogtreecommitdiff
path: root/app-admin/system-config-printer/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2020-11-28 20:40:51 +0000
committerV3n3RiX <venerix@redcorelinux.org>2020-11-28 20:40:51 +0000
commit9c417bacd51da6d8b57fa9f37425161d30d4b95b (patch)
tree47c9d6e4243f39a1f48afd54c969b65b00a5c649 /app-admin/system-config-printer/files
parentd934827bf44b7cfcf6711964418148fa60877668 (diff)
gentoo resync : 28.11.2020
Diffstat (limited to 'app-admin/system-config-printer/files')
-rw-r--r--app-admin/system-config-printer/files/system-config-printer-1.5.12-check-for-null.patch46
-rw-r--r--app-admin/system-config-printer/files/system-config-printer-1.5.12-fix-abrt-in-udev-configure-printer.patch72
2 files changed, 0 insertions, 118 deletions
diff --git a/app-admin/system-config-printer/files/system-config-printer-1.5.12-check-for-null.patch b/app-admin/system-config-printer/files/system-config-printer-1.5.12-check-for-null.patch
deleted file mode 100644
index b0df809c9398..000000000000
--- a/app-admin/system-config-printer/files/system-config-printer-1.5.12-check-for-null.patch
+++ /dev/null
@@ -1,46 +0,0 @@
-From cf9903466c1a2d18a701f3b5e8c7e03483e1244d Mon Sep 17 00:00:00 2001
-From: Zdenek Dohnal <zdohnal@redhat.com>
-Date: Mon, 14 Oct 2019 16:39:28 +0200
-Subject: [PATCH] udev-configure-printer: Add checks for NULL
-
----
- udev/udev-configure-printer.c | 12 +++++++++---
- 1 file changed, 9 insertions(+), 3 deletions(-)
-
-diff --git a/udev/udev-configure-printer.c b/udev/udev-configure-printer.c
-index 83092fc21..d753bbeaf 100644
---- a/udev/udev-configure-printer.c
-+++ b/udev/udev-configure-printer.c
-@@ -1411,7 +1411,7 @@ for_each_matching_queue (struct device_uris *device_uris,
- const char *printer_state_message = NULL;
- int state = 0;
- size_t i, l;
-- char *this_device_uri_n, *device_uri_n;
-+ char *this_device_uri_n = NULL, *device_uri_n = NULL;
- const char *ps1, *ps2, *pi1, *pi2;
-
- while (attr && ippGetGroupTag (attr) != IPP_TAG_PRINTER)
-@@ -1448,6 +1448,8 @@ for_each_matching_queue (struct device_uris *device_uris,
- for (i = 0; i < device_uris->n_uris; i++)
- {
- device_uri_n = normalize_device_uri(device_uris->uri[i]);
-+ if (this_device_uri_n == NULL || device_uri_n == NULL)
-+ goto skip;
- /* As for the same device different URIs can come out when the
- device is accessed via the usblp kernel module or via low-
- level USB (libusb) we cannot simply compare URIs, must
-@@ -1512,8 +1514,12 @@ for_each_matching_queue (struct device_uris *device_uris,
- firstqueue = 0;
-
- skip:
-- free(device_uri_n);
-- free(this_device_uri_n);
-+ if (device_uri_n != NULL)
-+ free(device_uri_n);
-+ device_uri_n = NULL;
-+ if (this_device_uri_n != NULL)
-+ free(this_device_uri_n);
-+ this_device_uri_n = NULL;
- if (!attr)
- break;
- }
diff --git a/app-admin/system-config-printer/files/system-config-printer-1.5.12-fix-abrt-in-udev-configure-printer.patch b/app-admin/system-config-printer/files/system-config-printer-1.5.12-fix-abrt-in-udev-configure-printer.patch
deleted file mode 100644
index 7aed67584f70..000000000000
--- a/app-admin/system-config-printer/files/system-config-printer-1.5.12-fix-abrt-in-udev-configure-printer.patch
+++ /dev/null
@@ -1,72 +0,0 @@
-From b9289dfe105bdb502f183f0afe7a115ecae5f2af Mon Sep 17 00:00:00 2001
-From: Zdenek Dohnal <zdohnal@redhat.com>
-Date: Fri, 1 Nov 2019 15:55:34 +0100
-Subject: [PATCH] Fix abrt in udev-configure-printer
-
-The abrt was due invalid free - several printer models have its normalized uri cropped.
-The original pointer from strdup() was lost so its freeing was invalid.
----
- udev/udev-configure-printer.c | 21 ++++++++++++++-------
- 1 file changed, 14 insertions(+), 7 deletions(-)
-
-diff --git a/udev/udev-configure-printer.c b/udev/udev-configure-printer.c
-index d753bbeaf..a44520f9c 100644
---- a/udev/udev-configure-printer.c
-+++ b/udev/udev-configure-printer.c
-@@ -1285,7 +1285,8 @@ normalize_device_uri(const char *str_orig)
- {
- int i, j;
- int havespace = 0;
-- char *str;
-+ char *str = NULL;
-+ char *cropped_str = NULL;
-
- if (str_orig == NULL)
- return NULL;
-@@ -1333,7 +1334,11 @@ normalize_device_uri(const char *str_orig)
- (strstr(str, "packard ") == str) ||
- (strstr(str, "apollo ") == str) ||
- (strstr(str, "usb ") == str))
-- str = strchr(str, ' ') + 1;
-+ {
-+ cropped_str = strdup(strchr(str, ' ') + 1);
-+ free(str);
-+ str = cropped_str;
-+ }
-
- return str;
- }
-@@ -1448,8 +1453,6 @@ for_each_matching_queue (struct device_uris *device_uris,
- for (i = 0; i < device_uris->n_uris; i++)
- {
- device_uri_n = normalize_device_uri(device_uris->uri[i]);
-- if (this_device_uri_n == NULL || device_uri_n == NULL)
-- goto skip;
- /* As for the same device different URIs can come out when the
- device is accessed via the usblp kernel module or via low-
- level USB (libusb) we cannot simply compare URIs, must
-@@ -1509,17 +1512,21 @@ for_each_matching_queue (struct device_uris *device_uris,
- break;
- }
- }
-+ if (device_uri_n != NULL)
-+ {
-+ free(device_uri_n);
-+ device_uri_n = NULL;
-+ }
- }
-
- firstqueue = 0;
-
- skip:
-- if (device_uri_n != NULL)
-- free(device_uri_n);
-- device_uri_n = NULL;
- if (this_device_uri_n != NULL)
-+ {
- free(this_device_uri_n);
- this_device_uri_n = NULL;
-+ }
- if (!attr)
- break;
- }