|
|
8ec51b |
From 952cac5f4a17e52aec7d0536f405b25428367840 Mon Sep 17 00:00:00 2001
|
|
|
8ec51b |
From: ph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15>
|
|
|
8ec51b |
Date: Fri, 17 Aug 2018 14:50:21 +0000
|
|
|
8ec51b |
Subject: [PATCH] Fix bad auto-possessify for certain classes.
|
|
|
8ec51b |
MIME-Version: 1.0
|
|
|
8ec51b |
Content-Type: text/plain; charset=UTF-8
|
|
|
8ec51b |
Content-Transfer-Encoding: 8bit
|
|
|
8ec51b |
|
|
|
8ec51b |
git-svn-id: svn://vcs.exim.org/pcre/code/trunk@1738 2f5784b3-3f2a-0410-8824-cb99058d5e15
|
|
|
8ec51b |
Petr Písař: Ported to 8.42.
|
|
|
8ec51b |
---
|
|
|
8ec51b |
pcre_compile.c | 4 ++--
|
|
|
8ec51b |
testdata/testinput4 | 3 +++
|
|
|
8ec51b |
testdata/testoutput4 | 4 ++++
|
|
|
8ec51b |
|
|
|
8ec51b |
diff --git a/pcre_compile.c b/pcre_compile.c
|
|
|
8ec51b |
index 6dd8886..3991d6c 100644
|
|
|
8ec51b |
--- a/pcre_compile.c
|
|
|
8ec51b |
+++ b/pcre_compile.c
|
|
|
8ec51b |
@@ -6,7 +6,7 @@
|
|
|
8ec51b |
and semantics are as close as possible to those of the Perl 5 language.
|
|
|
8ec51b |
|
|
|
8ec51b |
Written by Philip Hazel
|
|
|
8ec51b |
- Copyright (c) 1997-2016 University of Cambridge
|
|
|
8ec51b |
+ Copyright (c) 1997-2018 University of Cambridge
|
|
|
8ec51b |
|
|
|
8ec51b |
-----------------------------------------------------------------------------
|
|
|
8ec51b |
Redistribution and use in source and binary forms, with or without
|
|
|
8ec51b |
@@ -3299,7 +3299,7 @@ for(;;)
|
|
|
8ec51b |
if ((*xclass_flags & XCL_MAP) == 0)
|
|
|
8ec51b |
{
|
|
|
8ec51b |
/* No bits are set for characters < 256. */
|
|
|
8ec51b |
- if (list[1] == 0) return TRUE;
|
|
|
8ec51b |
+ if (list[1] == 0) return (*xclass_flags & XCL_NOT) == 0;
|
|
|
8ec51b |
/* Might be an empty repeat. */
|
|
|
8ec51b |
continue;
|
|
|
8ec51b |
}
|
|
|
8ec51b |
diff --git a/testdata/testinput4 b/testdata/testinput4
|
|
|
8ec51b |
index 8bdbdac..63368c0 100644
|
|
|
8ec51b |
--- a/testdata/testinput4
|
|
|
8ec51b |
+++ b/testdata/testinput4
|
|
|
8ec51b |
@@ -727,4 +727,7 @@
|
|
|
8ec51b |
/\C(\W?ſ)'?{{/8
|
|
|
8ec51b |
\\C(\\W?ſ)'?{{
|
|
|
8ec51b |
|
|
|
8ec51b |
+/[^\x{100}-\x{ffff}]*[\x80-\xff]/8
|
|
|
8ec51b |
+ \x{99}\x{99}\x{99}
|
|
|
8ec51b |
+
|
|
|
8ec51b |
/-- End of testinput4 --/
|
|
|
8ec51b |
diff --git a/testdata/testoutput4 b/testdata/testoutput4
|
|
|
8ec51b |
index d43c123..69e812c 100644
|
|
|
8ec51b |
--- a/testdata/testoutput4
|
|
|
8ec51b |
+++ b/testdata/testoutput4
|
|
|
8ec51b |
@@ -1277,4 +1277,8 @@ No match
|
|
|
8ec51b |
\\C(\\W?ſ)'?{{
|
|
|
8ec51b |
No match
|
|
|
8ec51b |
|
|
|
8ec51b |
+/[^\x{100}-\x{ffff}]*[\x80-\xff]/8
|
|
|
8ec51b |
+ \x{99}\x{99}\x{99}
|
|
|
8ec51b |
+ 0: \x{99}\x{99}\x{99}
|
|
|
8ec51b |
+
|
|
|
8ec51b |
/-- End of testinput4 --/
|
|
|
8ec51b |
--
|
|
|
8ec51b |
2.14.4
|
|
|
8ec51b |
|