summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15>2012-07-06 08:55:10 +0000
committerph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15>2012-07-06 08:55:10 +0000
commitf89f09c645ad87f321dcb2c446d0f0d71be488ea (patch)
tree0e839222e6eae83714a452df96f83515db2b874b
parent03ae083c6793d4105e479d1d9a30536fa3fbd28a (diff)
downloadpcre-f89f09c645ad87f321dcb2c446d0f0d71be488ea.tar.gz
Fix 2 incorrect #ifdefs in pcre_study.c.
git-svn-id: svn://vcs.exim.org/pcre/code/trunk@983 2f5784b3-3f2a-0410-8824-cb99058d5e15
-rw-r--r--ChangeLog5
-rw-r--r--pcre_study.c4
-rw-r--r--testdata/testinput185
-rw-r--r--testdata/testoutput1816
4 files changed, 26 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index 832da5e..fe85d67 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,7 +1,7 @@
ChangeLog for PCRE
------------------
-Version 8.31 20-June-2012
+Version 8.31 06-July-2012
-------------------------
1. Fixing a wrong JIT test case and some compiler warnings.
@@ -150,6 +150,9 @@ Version 8.31 20-June-2012
and pcregrep, because some OS require shared objects to be explicitly
passed to ld, causing the link step to fail if they are not.
+41. There were two incorrect #ifdefs in pcre_study.c, meaning that, in 16-bit
+ mode, patterns that started with \h* or \R* might be incorrectly matched.
+
Version 8.30 04-February-2012
-----------------------------
diff --git a/pcre_study.c b/pcre_study.c
index 72f435b..85cb514 100644
--- a/pcre_study.c
+++ b/pcre_study.c
@@ -1123,7 +1123,7 @@ do
case OP_HSPACE:
SET_BIT(0x09);
SET_BIT(0x20);
-#ifdef COMPILE_PCRE8
+#ifdef SUPPORT_UTF
if (utf)
{
#ifdef COMPILE_PCRE8
@@ -1148,7 +1148,7 @@ do
SET_BIT(0x0B);
SET_BIT(0x0C);
SET_BIT(0x0D);
-#ifdef COMPILE_PCRE8
+#ifdef SUPPORT_UTF
if (utf)
{
#ifdef COMPILE_PCRE8
diff --git a/testdata/testinput18 b/testdata/testinput18
index d0e46dd..add1836 100644
--- a/testdata/testinput18
+++ b/testdata/testinput18
@@ -194,6 +194,11 @@ correctly, but that messes up comparisons). --/
/\h*A/SI8
CDBABC
+ \x{2000}ABC
+
+/\R*A/SI8
+ CDBABC
+ \x{2028}A
/\v+A/SI8
diff --git a/testdata/testoutput18 b/testdata/testoutput18
index adc3ab4..dd8b592 100644
--- a/testdata/testoutput18
+++ b/testdata/testoutput18
@@ -692,9 +692,23 @@ Options: utf
No first char
Need char = 'A'
Subject length lower bound = 1
-Starting byte set: \x09 \x20 A \xa0
+Starting byte set: \x09 \x20 A \xa0 \xff
CDBABC
0: A
+ \x{2000}ABC
+ 0: \x{2000}A
+
+/\R*A/SI8
+Capturing subpattern count = 0
+Options: utf
+No first char
+Need char = 'A'
+Subject length lower bound = 1
+Starting byte set: \x0a \x0b \x0c \x0d A \x85 \xff
+ CDBABC
+ 0: A
+ \x{2028}A
+ 0: \x{2028}A
/\v+A/SI8
Capturing subpattern count = 0