From: Serhiy Storchaka Date: Tue, 20 Aug 2013 17:04:47 +0000 (+0300) Subject: Issue #13461: Fix a crash in the TextIOWrapper.tell method on 64-bit platforms. X-Git-Tag: v3.4.0a2~175^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ec67d187ee9a86aaf1108643832f69ad3bc0e369;p=python Issue #13461: Fix a crash in the TextIOWrapper.tell method on 64-bit platforms. Patch by Yogesh Chaudhari. --- diff --git a/Misc/NEWS b/Misc/NEWS index 450f862cd1..27fa09d743 100644 --- 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. diff --git a/Modules/_io/textio.c b/Modules/_io/textio.c index cd751c1400..111cc7edde 100644 --- a/Modules/_io/textio.c +++ b/Modules/_io/textio.c @@ -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;