[Python-checkins] cpython (3.3): 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:01 CEST 2013


http://hg.python.org/cpython/rev/826233404be8
changeset:   85278:826233404be8
branch:      3.3
parent:      85274:7ab07f15d78c
user:        Serhiy Storchaka <storchaka at gmail.com>
date:        Tue Aug 20 20:04:47 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
@@ -66,6 +66,9 @@
 Library
 -------
 
+- Issue #13461: Fix a crash in the TextIOWrapper.tell method on 64-bit
+  platforms.  Patch by Yogesh Chaudhari.
+
 - Issue #18777: The ssl module now uses the new CRYPTO_THREADID API of
   OpenSSL 1.0.0+ instead of the deprecated CRYPTO id callback function.
 
diff --git a/Modules/_io/textio.c b/Modules/_io/textio.c
--- a/Modules/_io/textio.c
+++ b/Modules/_io/textio.c
@@ -2370,7 +2370,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