summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog4
-rw-r--r--generic/tclParse.c5
2 files changed, 7 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 4dcdeb5..ae9e7f6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2007-06-06 Miguel Sofer <msofer@users.sf.net>
+
+ * generic/tclParse.c: fix for uninit read [Bug 1732414].
+
2007-06-06 Daniel Steffen <das@users.sourceforge.net>
* macosx/Tcl.xcodeproj/project.pbxproj: add settings for Fix&Continue.
diff --git a/generic/tclParse.c b/generic/tclParse.c
index bcf788c..0f63a75 100644
--- a/generic/tclParse.c
+++ b/generic/tclParse.c
@@ -12,7 +12,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclParse.c,v 1.53 2007/05/30 18:12:59 dgp Exp $
+ * RCS: @(#) $Id: tclParse.c,v 1.54 2007/06/06 23:07:06 msofer Exp $
*/
#include "tclInt.h"
@@ -460,9 +460,10 @@ Tcl_ParseCommand(
* list elements.
*/
- while ((code == TCL_OK) && (nextElem < listEnd)) {
+ while (nextElem < listEnd) {
code = TclFindElement(NULL, nextElem, listEnd - nextElem,
&elemStart, &nextElem, NULL, NULL);
+ if (code != TCL_OK) break;
if (elemStart < listEnd) {
elemCount++;
}