summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2014-12-04 21:29:18 (GMT)
committerdgp <dgp@users.sourceforge.net>2014-12-04 21:29:18 (GMT)
commit640e5762bc7e0aa585f1135dde28e2fa9434e79e (patch)
treeca5b53d4a09396ccb6458f4999e411a421a36961
parentc4c311b0e2ca10bc95a35e3f60d9a939b55c26e4 (diff)
downloadtcl-640e5762bc7e0aa585f1135dde28e2fa9434e79e.zip
tcl-640e5762bc7e0aa585f1135dde28e2fa9434e79e.tar.gz
tcl-640e5762bc7e0aa585f1135dde28e2fa9434e79e.tar.bz2
Limit isalpha(.) calls in the expr parser to only apply to known ASCIIbug_d2ffcca163
arguments to make the results portable.
-rw-r--r--generic/tclCompExpr.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/generic/tclCompExpr.c b/generic/tclCompExpr.c
index 2470931..7b67970 100644
--- a/generic/tclCompExpr.c
+++ b/generic/tclCompExpr.c
@@ -1883,7 +1883,7 @@ ParseLexeme(
case 'i':
if ((numBytes > 1) && (start[1] == 'n')
- && ((numBytes == 2) || !isalpha(UCHAR(start[2])))) {
+ && ((numBytes == 2) || start[2] & 0x80 || !isalpha(start[2]))) {
/*
* Must make this check so we can tell the difference between
@@ -1898,14 +1898,15 @@ ParseLexeme(
case 'e':
if ((numBytes > 1) && (start[1] == 'q')
- && ((numBytes == 2) || !isalpha(UCHAR(start[2])))) {
+ && ((numBytes == 2) || start[2] & 0x80 || !isalpha(start[2]))) {
*lexemePtr = STREQ;
return 2;
}
break;
case 'n':
- if ((numBytes > 1) && ((numBytes == 2) || !isalpha(UCHAR(start[2])))) {
+ if ((numBytes > 1)
+ && ((numBytes == 2) || start[2] & 0x80 || !isalpha(start[2]))) {
switch (start[1]) {
case 'e':
*lexemePtr = STRNEQ;