From 75dbf5719bad3d3db1c9157964888965902ac954 Mon Sep 17 00:00:00 2001 From: DistroBaker Date: Tue, 15 Dec 2020 11:08:21 +0000 Subject: [PATCH] Merged update from upstream sources This is an automated DistroBaker update from upstream sources. If you do not know what this is about or would like to opt out, contact the OSCI team. Source: https://src.fedoraproject.org/rpms/python-cups.git#c5cbcc3c855051aacd170805903a205121cbba9d --- pycups-invalid-pointer.patch | 21 +++++++++++++++++++++ python-cups.spec | 6 +++++- 2 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 pycups-invalid-pointer.patch diff --git a/pycups-invalid-pointer.patch b/pycups-invalid-pointer.patch new file mode 100644 index 0000000..7824a07 --- /dev/null +++ b/pycups-invalid-pointer.patch @@ -0,0 +1,21 @@ +diff --git a/cupsconnection.c b/cupsconnection.c +index 132dd25..d54a7fa 100644 +--- a/cupsconnection.c ++++ b/cupsconnection.c +@@ -3827,7 +3827,7 @@ Connection_printTestPage (Connection *self, PyObject *args, PyObject *kwds) + const char *datadir; + char filename[PATH_MAX]; + char uri[HTTP_MAX_URI]; +- ipp_t *request, *answer; ++ ipp_t *request, *answer = NULL; + ipp_attribute_t *attr; + char *resource; + int jobid = 0; +@@ -3923,6 +3923,7 @@ Connection_printTestPage (Connection *self, PyObject *args, PyObject *kwds) + Connection_end_allow_threads (self); + if (answer && ippGetStatusCode (answer) == IPP_NOT_POSSIBLE) { + ippDelete (answer); ++ answer = NULL; + // Perhaps it's a class, not a printer. + construct_uri (uri, sizeof (uri), + "ipp://localhost/classes/", printer); diff --git a/python-cups.spec b/python-cups.spec index e2e652d..4303cfe 100644 --- a/python-cups.spec +++ b/python-cups.spec @@ -6,7 +6,7 @@ Summary: Python bindings for CUPS Name: python-cups Version: 2.0.1 -Release: 6%{?dist} +Release: 7%{?dist} # older URL, but still with useful information about pycups #URL: http://cyberelk.net/tim/software/pycups/ URL: https://github.com/OpenPrinting/pycups/ @@ -16,6 +16,7 @@ License: GPLv2+ # all taken from upstream Patch01: 0001-examples-cupstree.py-remove-shebang.patch Patch02: 0001-postscriptdriver.prov-ignore-driverless-utilities.patch +Patch03: pycups-invalid-pointer.patch # gcc is no longer in buildroot by default BuildRequires: gcc @@ -73,6 +74,9 @@ export PYTHONPATH=%{buildroot}%{python3_sitearch} %doc examples html %changelog +* Mon Dec 14 2020 Zdenek Dohnal - 2.0.1-7 +- fix invalid delete (upstream ticket #11) + * Thu Nov 05 2020 Zdenek Dohnal - 2.0.1-6 - make is no longer in buildroot by default - use smaller git-core instead of git