summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authorhershey <hershey@noemail.net>1999-06-17 00:20:53 (GMT)
committerhershey <hershey@noemail.net>1999-06-17 00:20:53 (GMT)
commit54b03084f36244f74ac591de51647356dc83d612 (patch)
tree154089939fbd1184a3d2671f55fc0c3a8a91f268 /generic
parent0f2c4aa40c7b33b85899a6a074123111f38e87de (diff)
downloadtcl-54b03084f36244f74ac591de51647356dc83d612.zip
tcl-54b03084f36244f74ac591de51647356dc83d612.tar.gz
tcl-54b03084f36244f74ac591de51647356dc83d612.tar.bz2
* generic/tclVar.c (Tcl_VariableObjCmd): fixed premature increment
in loop that was causing out-of-bounds reads on array "varName". FossilOrigin-Name: 53b13ff96a3a88ca83c2c388e2aba02413e9bad7
Diffstat (limited to 'generic')
-rw-r--r--generic/tclVar.c6
1 files changed, 3 insertions, 3 deletions
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;
}
}
}