Blame SOURCES/pcre-8.42-Fix-bad-auto-possessify-for-certain-classes.patch

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