summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiguel Sofer <miguel.sofer@gmail.com>2007-06-06 23:07:05 (GMT)
committerMiguel Sofer <miguel.sofer@gmail.com>2007-06-06 23:07:05 (GMT)
commit7658f9b25629d3a098ccd7eb0a5d9e5b79d0a5af (patch)
tree6f53cd8fe5b629768b28efc3f20ba89e86b83bd3
parent6f2cb1c3833edfcb13bda8041d4c1a673e1b503d (diff)
downloadtcl-7658f9b25629d3a098ccd7eb0a5d9e5b79d0a5af.zip
tcl-7658f9b25629d3a098ccd7eb0a5d9e5b79d0a5af.tar.gz
tcl-7658f9b25629d3a098ccd7eb0a5d9e5b79d0a5af.tar.bz2
* generic/tclParse.c: fix for uninit read [Bug 1732414].
-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++;
}