From e903e08c727987af3ddea0475f5803e87366a50c Mon Sep 17 00:00:00 2001 From: hobbs Date: Tue, 10 Aug 2010 20:48:52 +0000 Subject: * generic/tclUtil.c (TclByteArrayMatch): patterns may not be null-terminated, so account for that. --- ChangeLog | 5 +++++ generic/tclUtil.c | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index bfaaff6..ccae0a5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2010-08-10 Jeff Hobbs + + * generic/tclUtil.c (TclByteArrayMatch): patterns may not be + null-terminated, so account for that. + 2010-08-09 Don Porter * changes: Updates for 8.6b2 release. diff --git a/generic/tclUtil.c b/generic/tclUtil.c index b583af5..723308a 100644 --- a/generic/tclUtil.c +++ b/generic/tclUtil.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclUtil.c,v 1.115 2010/04/27 12:36:22 nijtmans Exp $ + * RCS: @(#) $Id: tclUtil.c,v 1.116 2010/08/10 20:48:52 hobbs Exp $ */ #include "tclInt.h" @@ -1612,7 +1612,7 @@ TclByteArrayMatch( * Skip all successive *'s in the pattern. */ - while (*(++pattern) == '*') { + while ((++pattern < patternEnd) && (*pattern == '*')) { /* empty body */ } if (pattern == patternEnd) { -- cgit v0.12