From 6963cb20a8023e352bb03d5003ff25ad146ac758 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com>
Date: Wed, 18 Nov 2015 13:24:09 +0100
Subject: [PATCH] Fix [:punct:] bug in UCP mode (interpreter only).
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Upstream commit ported to 8.37:
commit 9660a9ee23143928ed55e00a8081f93c67613305
Author: ph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15>
Date: Tue Nov 17 17:53:37 2015 +0000
Fix [:punct:] bug in UCP mode (interpreter only).
git-svn-id: svn://vcs.exim.org/pcre/code/trunk@1605 2f5784b3-3f2a-0410-8824-cb99058d5e15
Signed-off-by: Petr Písař <ppisar@redhat.com>
---
pcre_xclass.c | 2 +-
testdata/testinput6 | 4 ++++
testdata/testoutput6 | 6 ++++++
3 files changed, 11 insertions(+), 1 deletion(-)
diff --git a/pcre_xclass.c b/pcre_xclass.c
index c2b61f0..ef759a5 100644
--- a/pcre_xclass.c
+++ b/pcre_xclass.c
@@ -246,7 +246,7 @@ while ((t = *data++) != XCL_END)
case PT_PXPUNCT:
if ((PRIV(ucp_gentype)[prop->chartype] == ucp_P ||
- (c < 256 && PRIV(ucp_gentype)[prop->chartype] == ucp_S)) == isprop)
+ (c < 128 && PRIV(ucp_gentype)[prop->chartype] == ucp_S)) == isprop)
return !negated;
break;
diff --git a/testdata/testinput6 b/testdata/testinput6
index 02cef0d..548a9d5 100644
--- a/testdata/testinput6
+++ b/testdata/testinput6
@@ -1502,4 +1502,8 @@
/\C\X*QT/8
Ӆ\x0aT
+/[[:punct:]]/8W
+ \xc2\xb4
+ \x{b4}
+
/-- End of testinput6 --/
diff --git a/testdata/testoutput6 b/testdata/testoutput6
index 3f035b8..e4e0de7 100644
--- a/testdata/testoutput6
+++ b/testdata/testoutput6
@@ -2469,4 +2469,10 @@ No match
Ӆ\x0aT
No match
+/[[:punct:]]/8W
+ \xc2\xb4
+No match
+ \x{b4}
+No match
+
/-- End of testinput6 --/
--
2.4.3