From 15888e552b012280c4de7b8bdb67c5cafd8062de Mon Sep 17 00:00:00 2001 From: hershey Date: Thu, 17 Jun 1999 00:20:54 +0000 Subject: * generic/tclVar.c (Tcl_VariableObjCmd): fixed premature increment in loop that was causing out-of-bounds reads on array "varName". --- ChangeLog | 5 +++++ generic/tclVar.c | 6 +++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index a2c313a..728f4f0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +1999-06-16 Melissa Hirschl + + * generic/tclVar.c (Tcl_VariableObjCmd): fixed premature increment + in loop that was causing out-of-bounds reads on array "varName". + 1999-06-16 * tests/execute.test: diff --git a/generic/tclVar.c b/generic/tclVar.c index f2df52e..0618012 100644 --- a/generic/tclVar.c +++ b/generic/tclVar.c @@ -14,7 +14,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclVar.c,v 1.9 1999/06/08 02:59:27 hershey Exp $ + * RCS: @(#) $Id: tclVar.c,v 1.10 1999/06/17 00:20:55 hershey Exp $ */ #include "tclInt.h" @@ -3824,8 +3824,8 @@ Tcl_VariableObjCmd(dummy, interp, objc, objv) for (tail = cp = varName; *cp != '\0'; ) { if (*cp++ == ':') { - while (*cp++ == ':') { - tail = cp; + while (*cp == ':') { + tail = ++cp; } } } -- cgit v0.12