diff options
author | dgp <dgp@noemail.net> | 2008-08-12 17:51:01 (GMT) |
---|---|---|
committer | dgp <dgp@noemail.net> | 2008-08-12 17:51:01 (GMT) |
commit | 85fa427c0013570b0529146778e82df2e1e0ff53 (patch) | |
tree | 29357b9d5efbf0ff6050338a65f7256fe4d255ff /generic/tclOOMethod.c | |
parent | b6dc33c9bb273e1be6e14dbf0188dd4af0676e8f (diff) | |
download | tcl-85fa427c0013570b0529146778e82df2e1e0ff53.zip tcl-85fa427c0013570b0529146778e82df2e1e0ff53.tar.gz tcl-85fa427c0013570b0529146778e82df2e1e0ff53.tar.bz2 |
* generic/tclOOMethod.c (PushMethodCallFrame): Added missing check
for bytecode validity. [Bug 2037727]
FossilOrigin-Name: ccb470815e5f589b050a5a8fd5cbd3b140f5258d
Diffstat (limited to 'generic/tclOOMethod.c')
-rw-r--r-- | generic/tclOOMethod.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/generic/tclOOMethod.c b/generic/tclOOMethod.c index f17b09b..c977a3b 100644 --- a/generic/tclOOMethod.c +++ b/generic/tclOOMethod.c @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclOOMethod.c,v 1.12 2008/08/09 00:15:09 das Exp $ + * RCS: @(#) $Id: tclOOMethod.c,v 1.13 2008/08/12 17:51:03 dgp Exp $ */ #ifdef HAVE_CONFIG_H @@ -787,14 +787,17 @@ PushMethodCallFrame( fdPtr->cmd.clientData = &fdPtr->efi; pmPtr->procPtr->cmdPtr = &fdPtr->cmd; - if (pmPtr->procPtr->bodyPtr->typePtr != &tclByteCodeType) { + /* + * [Bug 2037727] Always call TclProcCompileProc so that we check not + * only that we have bytecode, but also that it remains valid. + */ + result = TclProcCompileProc(interp, pmPtr->procPtr, pmPtr->procPtr->bodyPtr, (Namespace *) nsPtr, "body of method", namePtr); if (result != TCL_OK) { return result; } - } /* * Make the stack frame and fill it out with information about this call. |