summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Misc/NEWS2
-rw-r--r--Objects/exceptions.c3
2 files changed, 2 insertions, 3 deletions
diff --git a/Misc/NEWS b/Misc/NEWS
index 550dda3..2c6083d 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -37,6 +37,8 @@ Core and Builtins
- Issue #8969: On Windows, use mbcs codec in strict mode to encode and decode
filenames and enable os.fsencode().
+- 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).
diff --git a/Objects/exceptions.c b/Objects/exceptions.c
index 3d5b1ea..b82b6ba 100644
--- a/Objects/exceptions.c
+++ b/Objects/exceptions.c
@@ -1622,9 +1622,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, "sy#nns",
encoding, object, length, start, end, reason);
}