summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2010-03-30 16:31:09 (GMT)
committerdgp <dgp@users.sourceforge.net>2010-03-30 16:31:09 (GMT)
commit8898a2eaab27f4b350653e9cee5640c532ce6591 (patch)
tree27e19e52601b66a6d7de66e5d401b9f6c852b670
parentdfeca193ef249620df45325196b9ee70e984eef6 (diff)
downloadtcl-8898a2eaab27f4b350653e9cee5640c532ce6591.zip
tcl-8898a2eaab27f4b350653e9cee5640c532ce6591.tar.gz
tcl-8898a2eaab27f4b350653e9cee5640c532ce6591.tar.bz2
* generic/tclObj.c (Tcl_GetCommandFromObj): [Bug 2979402]: Reorder
the validity tests on internal rep of a "cmdName" value to avoid invalid reads reported by valgrind.
-rw-r--r--ChangeLog6
-rw-r--r--generic/tclObj.c4
2 files changed, 8 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index b95dd0c..63a71b2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2010-03-30 Don Porter <dgp@users.sourceforge.net>
+
+ * generic/tclObj.c (Tcl_GetCommandFromObj): [Bug 2979402]: Reorder
+ the validity tests on internal rep of a "cmdName" value to avoid
+ invalid reads reported by valgrind.
+
2010-03-30 Jan Nijtmans <nijtmans@users.sf.net>
* generic/tclIndexObj: [FRQ 2974744]: share exception codes (ObjType?):
diff --git a/generic/tclObj.c b/generic/tclObj.c
index 8123213..f16cb66 100644
--- a/generic/tclObj.c
+++ b/generic/tclObj.c
@@ -13,7 +13,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclObj.c,v 1.171 2010/02/25 22:20:10 nijtmans Exp $
+ * RCS: @(#) $Id: tclObj.c,v 1.172 2010/03/30 16:31:09 dgp Exp $
*/
#include "tclInt.h"
@@ -4139,8 +4139,8 @@ Tcl_GetCommandFromObj(
register Command *cmdPtr = resPtr->cmdPtr;
if ((cmdPtr->cmdEpoch == resPtr->cmdEpoch)
- && (interp == cmdPtr->nsPtr->interp)
&& !(cmdPtr->flags & CMD_IS_DELETED)
+ && (interp == cmdPtr->nsPtr->interp)
&& !(cmdPtr->nsPtr->flags & NS_DYING)) {
register Namespace *refNsPtr = (Namespace *)
TclGetCurrentNamespace(interp);