diff options
author | hobbs <hobbs> | 2010-08-10 20:48:52 (GMT) |
---|---|---|
committer | hobbs <hobbs> | 2010-08-10 20:48:52 (GMT) |
commit | e903e08c727987af3ddea0475f5803e87366a50c (patch) | |
tree | 18226edeab1accaee1b8f8a5e5ff638a87b87d61 /generic/tclUtil.c | |
parent | 4553b432eda6f65b4ba95d3dbff7a6f15be73e79 (diff) | |
download | tcl-e903e08c727987af3ddea0475f5803e87366a50c.zip tcl-e903e08c727987af3ddea0475f5803e87366a50c.tar.gz tcl-e903e08c727987af3ddea0475f5803e87366a50c.tar.bz2 |
* generic/tclUtil.c (TclByteArrayMatch): patterns may not be
null-terminated, so account for that.
Diffstat (limited to 'generic/tclUtil.c')
-rw-r--r-- | generic/tclUtil.c | 4 |
1 files changed, 2 insertions, 2 deletions
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) { |