diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2013-08-20 20:08:53 +0300 |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2013-08-20 20:08:53 +0300 |
commit | a9885e93eeecf799893dcfed59146f98859031f1 (patch) | |
tree | 76095f773981bfaccb8ac6588dcfc7ad9563bfc2 /Python/codecs.c | |
parent | 83737c632c9d12dc74074fc4884091bdfd2b15f0 (diff) | |
download | cpython-git-a9885e93eeecf799893dcfed59146f98859031f1.tar.gz |
Issue #13461: Fix a crash in the TextIOWrapper.tell method and in the "replace"
error handler on 64-bit platforms. Patch by Yogesh Chaudhari.
Diffstat (limited to 'Python/codecs.c')
-rw-r--r-- | Python/codecs.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Python/codecs.c b/Python/codecs.c index 91147a07a3..69498c4b0c 100644 --- a/Python/codecs.c +++ b/Python/codecs.c @@ -521,7 +521,7 @@ PyObject *PyCodec_ReplaceErrors(PyObject *exc) Py_UNICODE res = Py_UNICODE_REPLACEMENT_CHARACTER; if (PyUnicodeDecodeError_GetEnd(exc, &end)) return NULL; - return Py_BuildValue("(u#n)", &res, 1, end); + return Py_BuildValue("(u#n)", &res, (Py_ssize_t)1, end); } else if (PyObject_IsInstance(exc, PyExc_UnicodeTranslateError)) { PyObject *res; |