[New-bugs-announce] [issue17119] Integer overflow when passing large string to Tkinter

Serhiy Storchaka report at bugs.python.org
Sun Feb 3 20:35:39 CET 2013


New submission from Serhiy Storchaka:

Second argument of Tcl_NewUnicodeObj() which specifies a number of characters has type "int". When a large string with more than INT_MAX characters passed to Tkinter this value will overflow. If this parameter is negative, all characters up to the first null character are used (up to the end of string because current string implementation has null character after the end). When string length will be more than UINT_MAX, always only part of string will be converted.

I propose explicitly check a string length and raise an exception when the length overflows C int range.

----------
components: Tkinter
messages: 181288
nosy: serhiy.storchaka
priority: normal
severity: normal
status: open
title: Integer overflow when passing large string to Tkinter
type: behavior
versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue17119>
_______________________________________


More information about the New-bugs-announce mailing list