[Python-checkins] cpython (merge 3.3 -> default): Issue #13461: Fix a crash in the TextIOWrapper.tell method on 64-bit platforms.

serhiy.storchaka python-checkins at python.org
Tue Aug 20 19:12:02 CEST 2013


http://hg.python.org/cpython/rev/6c9d49b8e3ec
changeset:   85279:6c9d49b8e3ec
parent:      85277:4f7845be9e23
parent:      85278:826233404be8
user:        Serhiy Storchaka <storchaka at gmail.com>
date:        Tue Aug 20 20:07:50 2013 +0300
summary:
  Issue #13461: Fix a crash in the TextIOWrapper.tell method on 64-bit platforms.
Patch by Yogesh Chaudhari.

files:
  Misc/NEWS            |  3 +++
  Modules/_io/textio.c |  2 +-
  2 files changed, 4 insertions(+), 1 deletions(-)


diff --git a/Misc/NEWS b/Misc/NEWS
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -284,6 +284,9 @@
 Library
 -------
 
+- Issue #13461: Fix a crash in the TextIOWrapper.tell method on 64-bit
+  platforms.  Patch by Yogesh Chaudhari.
+
 - Issue #18681: Fix a NameError in importlib.reload() (noticed by Weizhao Li).
 
 - Issue #14323: Expanded the number of digits in the coefficients for the
diff --git a/Modules/_io/textio.c b/Modules/_io/textio.c
--- a/Modules/_io/textio.c
+++ b/Modules/_io/textio.c
@@ -2368,7 +2368,7 @@
     while (input < input_end) {
         Py_ssize_t n;
 
-        DECODER_DECODE(input, 1, n);
+        DECODER_DECODE(input, (Py_ssize_t)1, n);
         /* We got n chars for 1 byte */
         chars_decoded += n;
         cookie.bytes_to_feed += 1;

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list