Revision: 776
http://www.exim.org/viewvc/pcre2?view=rev&revision=776
Author: ph10
Date: 2017-05-10 16:42:13 +0100 (Wed, 10 May 2017)
Log Message:
-----------
Correct fix for experimental POSIX pattern translation.
Modified Paths:
--------------
code/trunk/src/pcre2_convert.c
code/trunk/testdata/testinput24
code/trunk/testdata/testoutput24
Modified: code/trunk/src/pcre2_convert.c
===================================================================
--- code/trunk/src/pcre2_convert.c 2017-05-09 10:44:50 UTC (rev 775)
+++ code/trunk/src/pcre2_convert.c 2017-05-10 15:42:13 UTC (rev 776)
@@ -279,12 +279,15 @@
/* Fall through */
case CHAR_ASTERISK:
+ case CHAR_DOT:
+ case CHAR_CIRCUMFLEX_ACCENT:
+ case CHAR_DOLLAR_SIGN:
if (p + 1 > endp) return PCRE2_ERROR_NOMEMORY;
*p++ = sc;
break;
-
+
default:
- if (c < 256 && strchr("\\{}?*+[]()|", c) != NULL)
+ if (c < 256 && strchr("\\{}?*+[]()|.^$", c) != NULL)
{
PUTCHARS(STR_BACKSLASH);
}
Modified: code/trunk/testdata/testinput24
===================================================================
--- code/trunk/testdata/testinput24 2017-05-09 10:44:50 UTC (rev 775)
+++ code/trunk/testdata/testinput24 2017-05-10 15:42:13 UTC (rev 776)
@@ -257,9 +257,9 @@
\= Expect no match
a1b
-/how.to/
+/how.to how\.to/
-/^how to/
+/^how to \^how to/
#pattern convert=unset
Modified: code/trunk/testdata/testoutput24
===================================================================
--- code/trunk/testdata/testoutput24 2017-05-09 10:44:50 UTC (rev 775)
+++ code/trunk/testdata/testoutput24 2017-05-10 15:42:13 UTC (rev 776)
@@ -411,11 +411,11 @@
a1b
No match
-/how.to/
-how.to
+/how.to how\.to/
+how.to how\.to
-/^how to/
-^how to
+/^how to \^how to/
+^how to \^how to
#pattern convert=unset