summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorhobbs <hobbs>2010-08-10 20:48:21 (GMT)
committerhobbs <hobbs>2010-08-10 20:48:21 (GMT)
commit1a13c836a3e8f873d11023c1c5da3c5d5797065a (patch)
tree973ef52f7c4d034e6a8c0ba0527a53b87c1a1243
parentb2037f6f9acd9d67b563353b463343eca0c64fcb (diff)
downloadtcl-1a13c836a3e8f873d11023c1c5da3c5d5797065a.zip
tcl-1a13c836a3e8f873d11023c1c5da3c5d5797065a.tar.gz
tcl-1a13c836a3e8f873d11023c1c5da3c5d5797065a.tar.bz2
* generic/tclUtil.c (TclByteArrayMatch): patterns may not be
null-terminated, so account for that.
-rw-r--r--ChangeLog5
-rw-r--r--generic/tclUtil.c4
2 files changed, 7 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 6e67f9a..9acb6e1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2010-08-10 Jeff Hobbs <jeffh@ActiveState.com>
+
+ * generic/tclUtil.c (TclByteArrayMatch): patterns may not be
+ null-terminated, so account for that.
+
2010-08-05 Don Porter <dgp@users.sourceforge.net>
*** 8.5.9 TAGGED FOR RELEASE ***
diff --git a/generic/tclUtil.c b/generic/tclUtil.c
index a2b4d84..64d36f4 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.97.2.5 2008/08/22 18:00:15 dgp Exp $
+ * RCS: @(#) $Id: tclUtil.c,v 1.97.2.6 2010/08/10 20:48:21 hobbs Exp $
*/
#include "tclInt.h"
@@ -1609,7 +1609,7 @@ TclByteArrayMatch(
* Skip all successive *'s in the pattern.
*/
- while (*(++pattern) == '*') {
+ while ((++pattern < patternEnd) && (*pattern == '*')) {
/* empty body */
}
if (pattern == patternEnd) {