From: Guilherme Polo Date: Sat, 7 Mar 2009 01:47:49 +0000 (+0000) Subject: Fixed issue #4792: Prevent a segfault in _tkinter by using the X-Git-Tag: v2.7a1~1888 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3768b2f4ce6660485399425aa09fbf6381900259;p=python Fixed issue #4792: Prevent a segfault in _tkinter by using the guaranteed to be safe interp argument given to the PythonCmd in place of the Tcl interpreter taken from a PythonCmd_ClientData. --- diff --git a/Misc/NEWS b/Misc/NEWS index 0e88f1deda..1eec608cc6 100644 --- a/Misc/NEWS +++ b/Misc/NEWS @@ -168,6 +168,10 @@ Core and Builtins Library ------- +- Issue #4792: Prevent a segfault in _tkinter by using the + guaranteed to be safe interp argument given to the PythonCmd in place of + the Tcl interpreter taken from a PythonCmd_ClientData. + - Issue #5193: Guarantee that Tkinter.Text.search returns a string. - Issue #5394: removed > 2.3 syntax from distutils.msvc9compiler. diff --git a/Modules/_tkinter.c b/Modules/_tkinter.c index d0d29ea4b7..4056bcd412 100644 --- a/Modules/_tkinter.c +++ b/Modules/_tkinter.c @@ -2070,7 +2070,7 @@ PythonCmd(ClientData clientData, Tcl_Interp *interp, int argc, char *argv[]) return PythonCmd_Error(interp); } else { - Tcl_SetObjResult(Tkapp_Interp(self), obj_res); + Tcl_SetObjResult(interp, obj_res); rv = TCL_OK; }