]> granicus.if.org Git - python/commitdiff
Merged revisions 82157 via svnmerge from
authorBenjamin Peterson <benjamin@python.org>
Tue, 22 Jun 2010 19:21:33 +0000 (19:21 +0000)
committerBenjamin Peterson <benjamin@python.org>
Tue, 22 Jun 2010 19:21:33 +0000 (19:21 +0000)
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r82157 | benjamin.peterson | 2010-06-22 14:16:37 -0500 (Tue, 22 Jun 2010) | 1 line

  remove INT_MAX assertions; they can fail with large Py_ssize_t #9058
........

Misc/NEWS
Objects/exceptions.c

index e8eab869ce0ae56f18020f80fff98d511110f4d3..832f7dfb817ae0924bbe456f5e607f6a136548fd 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -12,6 +12,8 @@ What's New in Python 2.6.6 alpha 1?
 Core and Builtins
 -----------------
 
+- Issue #9058: Remove assertions about INT_MAX in UnicodeDecodeError.
+
 - Issue #8941: decoding big endian UTF-32 data in UCS-2 builds could crash
   the interpreter with characters outside the Basic Multilingual Plane
   (higher than 0x10000).
index af67cc7b0cc96d1a5df665a3de244b8af8819f1e..a0d7b536a194a9ce6dce0843597dca48b6617f9a 100644 (file)
@@ -1785,9 +1785,6 @@ PyUnicodeDecodeError_Create(
     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);
 }