rpms/python/devel python-2.6.5-remove-PyUnicodeDecodeError_Create-assertions-issue9058.patch, NONE, 1.1 python.spec, 1.193, 1.194
dmalcolm
dmalcolm at fedoraproject.org
Tue Jun 22 18:40:57 UTC 2010
Author: dmalcolm
Update of /cvs/pkgs/rpms/python/devel
In directory cvs01.phx2.fedoraproject.org:/tmp/cvs-serv19762
Modified Files:
python.spec
Added Files:
python-2.6.5-remove-PyUnicodeDecodeError_Create-assertions-issue9058.patch
Log Message:
* Tue Jun 22 2010 David Malcolm <dmalcolm at redhat.com> - 2.6.5-17
- Stop python bailing out with an assertion failure when UnicodeDecodeErrors
occur on very large buffers (patch 120, upstream issue 9058)
python-2.6.5-remove-PyUnicodeDecodeError_Create-assertions-issue9058.patch:
exceptions.c | 14 +++++++++-----
1 file changed, 9 insertions(+), 5 deletions(-)
--- NEW FILE python-2.6.5-remove-PyUnicodeDecodeError_Create-assertions-issue9058.patch ---
Index: Objects/exceptions.c
===================================================================
--- Objects/exceptions.c (revision 82153)
+++ Objects/exceptions.c (working copy)
@@ -1784,11 +1784,15 @@
const char *encoding, const char *object, Py_ssize_t length,
Py_ssize_t start, Py_ssize_t end, const char *reason)
{
- assert(length < INT_MAX);
- assert(start < INT_MAX);
- assert(end < INT_MAX);
- return PyObject_CallFunction(PyExc_UnicodeDecodeError, "ss#nns",
- encoding, object, length, start, end, reason);
+ PyObject *str;
+
+ str = PyString_FromStringAndSize(object, length);
+
+ if (!str)
+ return NULL;
+
+ return PyObject_CallFunction(PyExc_UnicodeDecodeError, "sNnns",
+ encoding, str, start, end, reason);
}
Index: python.spec
===================================================================
RCS file: /cvs/pkgs/rpms/python/devel/python.spec,v
retrieving revision 1.193
retrieving revision 1.194
diff -u -p -r1.193 -r1.194
--- python.spec 21 Jun 2010 22:35:36 -0000 1.193
+++ python.spec 22 Jun 2010 18:40:57 -0000 1.194
@@ -63,7 +63,7 @@ Summary: An interpreted, interactive, ob
Name: %{python}
# Remember to also rebase python-docs when changing this:
Version: 2.6.5
-Release: 16%{?dist}
+Release: 17%{?dist}
License: Python
Group: Development/Languages
Provides: python-abi = %{pybasever}
@@ -401,6 +401,11 @@ Patch118: python-2.6.2-CVE-2008-5983.pat
# Sent upstream as http://bugs.python.org/issue9054
Patch119: python-2.6.5-fix-expat-issue9054.patch
+# Stop python bailing out with an assertion failure when UnicodeDecodeErrors
+# occur on very large buffers (rhbz:540518)
+# Sent upstream as http://bugs.python.org/issue9058
+Patch120: python-2.6.5-remove-PyUnicodeDecodeError_Create-assertions-issue9058.patch
+
%if %{main_python}
Obsoletes: Distutils
Provides: Distutils
@@ -640,6 +645,7 @@ rm -r Modules/zlib || exit 1
%patch117 -p1 -b .CVE-2010-2089
%patch118 -p1 -b .CVE-2008-5983
%patch119 -p0 -b .fix-expat-issue9054
+%patch120 -p0 -b .remove-unicode-decode-error-assertions-issue9058
# This shouldn't be necesarry, but is right now (2.2a3)
find -name "*~" |xargs rm -f
@@ -1364,6 +1370,10 @@ rm -fr %{buildroot}
# payload file would be unpackaged)
%changelog
+* Tue Jun 22 2010 David Malcolm <dmalcolm at redhat.com> - 2.6.5-17
+- Stop python bailing out with an assertion failure when UnicodeDecodeErrors
+occur on very large buffers (patch 120, upstream issue 9058)
+
* Mon Jun 21 2010 David Malcolm <dmalcolm at redhat.com> - 2.6.5-16
- Fix an incompatibility between pyexpat and the system expat-2.0.1 that led to
a segfault running test_pyexpat.py (patch 119; upstream issue 9054)
More information about the scm-commits
mailing list