From 7658f9b25629d3a098ccd7eb0a5d9e5b79d0a5af Mon Sep 17 00:00:00 2001 From: Miguel Sofer Date: Wed, 6 Jun 2007 23:07:05 +0000 Subject: * generic/tclParse.c: fix for uninit read [Bug 1732414]. --- ChangeLog | 4 ++++ generic/tclParse.c | 5 +++-- 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 + + * generic/tclParse.c: fix for uninit read [Bug 1732414]. + 2007-06-06 Daniel Steffen * 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++; } -- cgit v0.12