diff options
author | dgp <dgp@users.sourceforge.net> | 2008-08-12 17:51:02 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2008-08-12 17:51:02 (GMT) |
commit | 96184da694c1e5f119c8eea1bfff507bc151b3f3 (patch) | |
tree | 29357b9d5efbf0ff6050338a65f7256fe4d255ff /generic | |
parent | 06c2fab3218c8dc8a7a7582a182178f42c89964a (diff) | |
download | tcl-96184da694c1e5f119c8eea1bfff507bc151b3f3.zip tcl-96184da694c1e5f119c8eea1bfff507bc151b3f3.tar.gz tcl-96184da694c1e5f119c8eea1bfff507bc151b3f3.tar.bz2 |
* generic/tclOOMethod.c (PushMethodCallFrame): Added missing check
for bytecode validity. [Bug 2037727]
Diffstat (limited to 'generic')
-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. |