[Python-checkins] cpython (2.7): Fixed possible integer overflow in getint, getdouble and getboolean too (issue
serhiy.storchaka
python-checkins at python.org
Fri May 30 13:39:24 CEST 2014
http://hg.python.org/cpython/rev/8c96af2fba28
changeset: 90906:8c96af2fba28
branch: 2.7
parent: 90903:59468bd68789
user: Serhiy Storchaka <storchaka at gmail.com>
date: Fri May 30 14:28:21 2014 +0300
summary:
Fixed possible integer overflow in getint, getdouble and getboolean too (issue #21552).
files:
Modules/_tkinter.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/Modules/_tkinter.c b/Modules/_tkinter.c
--- a/Modules/_tkinter.c
+++ b/Modules/_tkinter.c
@@ -1894,6 +1894,7 @@
}
if (!PyArg_ParseTuple(args, "s:getint", &s))
return NULL;
+ CHECK_STRING_LENGTH(s);
if (Tcl_GetInt(Tkapp_Interp(self), s, &v) == TCL_ERROR)
return Tkinter_Error(self);
return Py_BuildValue("i", v);
@@ -1914,6 +1915,7 @@
}
if (!PyArg_ParseTuple(args, "s:getdouble", &s))
return NULL;
+ CHECK_STRING_LENGTH(s);
if (Tcl_GetDouble(Tkapp_Interp(self), s, &v) == TCL_ERROR)
return Tkinter_Error(self);
return Py_BuildValue("d", v);
@@ -1934,6 +1936,7 @@
}
if (!PyArg_ParseTuple(args, "s:getboolean", &s))
return NULL;
+ CHECK_STRING_LENGTH(s);
if (Tcl_GetBoolean(Tkapp_Interp(self), s, &v) == TCL_ERROR)
return Tkinter_Error(self);
return PyBool_FromLong(v);
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list