]> granicus.if.org Git - python/commitdiff
Issue #13461: Fix a crash in the TextIOWrapper.tell method on 64-bit platforms.
authorSerhiy Storchaka <storchaka@gmail.com>
Tue, 20 Aug 2013 17:04:47 +0000 (20:04 +0300)
committerSerhiy Storchaka <storchaka@gmail.com>
Tue, 20 Aug 2013 17:04:47 +0000 (20:04 +0300)
Patch by Yogesh Chaudhari.

Misc/NEWS
Modules/_io/textio.c

index 450f862cd1f6f38b92636009f6090636a2c023e0..27fa09d743c1ecd478958be74e80031203371404 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -66,6 +66,9 @@ Core and Builtins
 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.
 
index cd751c1400371aa40a41fec913f71c08d0a13a94..111cc7eddea0671cd86a238adf95c44e37f11732 100644 (file)
@@ -2370,7 +2370,7 @@ textiowrapper_tell(textio *self, PyObject *args)
     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;