Apply upstream patch to fix crash on loading invalid PPDs (bug #811159).
This commit is contained in:
parent
f44ffd122f
commit
b3444592e0
28
python-cups-ppd-null.patch
Normal file
28
python-cups-ppd-null.patch
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
diff -U0 pycups-1.9.61/ChangeLog.ppd-null pycups-1.9.61/ChangeLog
|
||||||
|
--- pycups-1.9.61/ChangeLog.ppd-null 2012-03-06 10:53:09.000000000 +0000
|
||||||
|
+++ pycups-1.9.61/ChangeLog 2012-04-10 12:22:16.224974764 +0100
|
||||||
|
@@ -0,0 +1,5 @@
|
||||||
|
+2012-03-22 Tim Waugh <twaugh@redhat.com>
|
||||||
|
+
|
||||||
|
+ * cupsppd.c (PPD_dealloc): Add missing NULL check for
|
||||||
|
+ debugging message (Ubuntu #951001). Patch from Till Kamppeter.
|
||||||
|
+
|
||||||
|
diff -up pycups-1.9.61/cupsppd.c.ppd-null pycups-1.9.61/cupsppd.c
|
||||||
|
--- pycups-1.9.61/cupsppd.c.ppd-null 2011-12-08 13:22:35.000000000 +0000
|
||||||
|
+++ pycups-1.9.61/cupsppd.c 2012-04-10 12:22:16.224974764 +0100
|
||||||
|
@@ -236,10 +236,12 @@ PPD_init (PPD *self, PyObject *args, PyO
|
||||||
|
static void
|
||||||
|
PPD_dealloc (PPD *self)
|
||||||
|
{
|
||||||
|
- debugprintf ("- PPD %p (fd %d)\n", self, fileno (self->file));
|
||||||
|
-
|
||||||
|
- if (self->file)
|
||||||
|
+ if (self->file) {
|
||||||
|
+ debugprintf ("- PPD %p (fd %d)\n", self, fileno (self->file));
|
||||||
|
fclose (self->file);
|
||||||
|
+ } else
|
||||||
|
+ debugprintf ("- PPD %p (no fd)\n", self);
|
||||||
|
+
|
||||||
|
if (self->ppd)
|
||||||
|
ppdClose (self->ppd);
|
||||||
|
if (self->conv_from)
|
@ -6,7 +6,7 @@
|
|||||||
Summary: Python bindings for CUPS
|
Summary: Python bindings for CUPS
|
||||||
Name: python-cups
|
Name: python-cups
|
||||||
Version: 1.9.61
|
Version: 1.9.61
|
||||||
Release: 1%{?dist}
|
Release: 2%{?dist}
|
||||||
URL: http://cyberelk.net/tim/software/pycups/
|
URL: http://cyberelk.net/tim/software/pycups/
|
||||||
Source: http://cyberelk.net/tim/data/pycups/pycups-%{version}.tar.bz2
|
Source: http://cyberelk.net/tim/data/pycups/pycups-%{version}.tar.bz2
|
||||||
License: GPLv2+
|
License: GPLv2+
|
||||||
@ -15,6 +15,8 @@ BuildRequires: cups-devel
|
|||||||
BuildRequires: python2-devel
|
BuildRequires: python2-devel
|
||||||
BuildRequires: epydoc
|
BuildRequires: epydoc
|
||||||
|
|
||||||
|
Patch1: python-cups-ppd-null.patch
|
||||||
|
|
||||||
Conflicts: rpm-build < 4.9.0
|
Conflicts: rpm-build < 4.9.0
|
||||||
|
|
||||||
%description
|
%description
|
||||||
@ -32,6 +34,9 @@ Documentation for python-cups.
|
|||||||
%prep
|
%prep
|
||||||
%setup -q -n pycups-%{version}
|
%setup -q -n pycups-%{version}
|
||||||
|
|
||||||
|
# Apply upstream patch to fix crash on loading invalid PPDs (bug #811159).
|
||||||
|
%patch1 -p1 -b .ppd-null
|
||||||
|
|
||||||
%build
|
%build
|
||||||
make CFLAGS="%{optflags} -fno-strict-aliasing"
|
make CFLAGS="%{optflags} -fno-strict-aliasing"
|
||||||
make doc
|
make doc
|
||||||
@ -52,6 +57,9 @@ make install DESTDIR="%{buildroot}"
|
|||||||
%doc examples html
|
%doc examples html
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Apr 10 2012 Tim Waugh <twaugh@redhat.com> - 1.9.61-2
|
||||||
|
- Apply upstream patch to fix crash on loading invalid PPDs (bug #811159).
|
||||||
|
|
||||||
* Tue Mar 6 2012 Tim Waugh <twaugh@redhat.com> - 1.9.61-1
|
* Tue Mar 6 2012 Tim Waugh <twaugh@redhat.com> - 1.9.61-1
|
||||||
- 1.9.61, fixing ref-counting bugs (bug #800143).
|
- 1.9.61, fixing ref-counting bugs (bug #800143).
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user