Propagate UTF-8 decoding errors.
This commit is contained in:
parent
d543dfd79d
commit
70aba906ee
14
python-cups-decoding.patch
Normal file
14
python-cups-decoding.patch
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
diff -U0 pycups-1.9.63/ChangeLog.encoding pycups-1.9.63/ChangeLog
|
||||||
|
diff -up pycups-1.9.63/cupsconnection.c.encoding pycups-1.9.63/cupsconnection.c
|
||||||
|
--- pycups-1.9.63/cupsconnection.c.encoding 2013-04-12 11:35:20.604099365 +0100
|
||||||
|
+++ pycups-1.9.63/cupsconnection.c 2013-04-12 11:35:34.945163243 +0100
|
||||||
|
@@ -129,6 +129,9 @@ UTF8_from_PyObj (char **const utf8, PyOb
|
||||||
|
else if (PyString_Check (obj)) {
|
||||||
|
const char *ret;
|
||||||
|
PyObject *unicodeobj = PyUnicode_FromEncodedObject (obj, NULL, NULL);
|
||||||
|
+ if (unicodeobj == NULL)
|
||||||
|
+ return NULL;
|
||||||
|
+
|
||||||
|
ret = UTF8_from_PyObj (utf8, unicodeobj);
|
||||||
|
Py_DECREF (unicodeobj);
|
||||||
|
return ret;
|
@ -6,10 +6,11 @@
|
|||||||
Summary: Python bindings for CUPS
|
Summary: Python bindings for CUPS
|
||||||
Name: python-cups
|
Name: python-cups
|
||||||
Version: 1.9.63
|
Version: 1.9.63
|
||||||
Release: 2%{?dist}
|
Release: 3%{?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
|
||||||
Patch1: python-cups-uris.patch
|
Patch1: python-cups-uris.patch
|
||||||
|
Patch2: python-cups-decoding.patch
|
||||||
License: GPLv2+
|
License: GPLv2+
|
||||||
Group: Development/Languages
|
Group: Development/Languages
|
||||||
BuildRequires: cups-devel
|
BuildRequires: cups-devel
|
||||||
@ -34,6 +35,9 @@ Documentation for python-cups.
|
|||||||
# Encode generated URIs correctly (patch from upstream) (bug #950162).
|
# Encode generated URIs correctly (patch from upstream) (bug #950162).
|
||||||
%patch1 -p1 -b .uris
|
%patch1 -p1 -b .uris
|
||||||
|
|
||||||
|
# Propagate UTF-8 decoding errors.
|
||||||
|
%patch2 -p1 -b .decoding
|
||||||
|
|
||||||
%build
|
%build
|
||||||
make CFLAGS="%{optflags} -fno-strict-aliasing"
|
make CFLAGS="%{optflags} -fno-strict-aliasing"
|
||||||
make doc
|
make doc
|
||||||
@ -52,6 +56,9 @@ make install DESTDIR="%{buildroot}"
|
|||||||
%doc examples html
|
%doc examples html
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Fri Apr 12 2013 Tim Waugh <twaugh@redhat.com> - 1.9.63-3
|
||||||
|
- Propagate UTF-8 decoding errors.
|
||||||
|
|
||||||
* Thu Apr 11 2013 Tim Waugh <twaugh@redhat.com> - 1.9.63-2
|
* Thu Apr 11 2013 Tim Waugh <twaugh@redhat.com> - 1.9.63-2
|
||||||
- Encode generated URIs correctly (bug #950162).
|
- Encode generated URIs correctly (bug #950162).
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user