From 004324cca99a52563cd03e1b7f98b924a3db8d5f Mon Sep 17 00:00:00 2001 From: Miguel Sofer Date: Mon, 15 Oct 2007 13:29:18 +0000 Subject: * generic/tclParse.c (Tcl_ParseBraces): fix for possible read after the end of buffer, [Bug 1813528] (Joe Mistachkin). --- ChangeLog | 5 +++++ generic/tclParse.c | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 09aab5e..5d44f33 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2007-10-15 Miguel Sofer + + * generic/tclParse.c (Tcl_ParseBraces): fix for possible read + after the end of buffer, [Bug 1813528] (Joe Mistachkin). + 2007-10-03 Miguel Sofer * generic/tclObj.c (Tcl_FindCommandFromObj): fix finding a deleted diff --git a/generic/tclParse.c b/generic/tclParse.c index e02f836..e939ef3 100644 --- a/generic/tclParse.c +++ b/generic/tclParse.c @@ -13,7 +13,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.25.2.2 2007/07/19 13:43:42 dgp Exp $ + * RCS: @(#) $Id: tclParse.c,v 1.25.2.3 2007/10/15 13:29:19 msofer Exp $ */ #include "tclInt.h" @@ -1441,7 +1441,7 @@ Tcl_ParseBraces(interp, string, numBytes, parsePtr, append, termPtr) * by a '#' on the same line. */ - for (; src > string; src--) { + while (--src > string) { switch (*src) { case '{': openBrace = 1; -- cgit v0.12