[pcre-dev] [Bug 2086] Bug in Regex match rule

Página superior
Eliminar este mensaje
Autor: admin
Fecha:  
A: pcre-dev
Asunto: [pcre-dev] [Bug 2086] Bug in Regex match rule
https://bugs.exim.org/show_bug.cgi?id=2086

Philip Hazel <ph10@???> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED


--- Comment #1 from Philip Hazel <ph10@???> ---
This bug was present in both PCRE1 and PCRE2. It was provoked by a possessive
repeated character class other than * + or ? (your example isn't explicitly
possessive, being [0-9]{3}, but it got automatically possessified because the
next character cannot be a digit). I have fixed both PCRE1 and PCRE2 in the SVN
repository. It was a small oversight in the code. Here is the patch for PCRE1
8.40:

--- pcre_dfa_exec.c     (revision 1681)
+++ pcre_dfa_exec.c     (working copy)
@@ -2625,7 +2625,7 @@
           if (isinclass)
             {
             int max = (int)GET2(ecode, 1 + IMM2_SIZE);
-            if (*ecode == OP_CRPOSRANGE)
+            if (*ecode == OP_CRPOSRANGE && count >= (int)GET2(ecode, 1))
               {
               active_count--;           /* Remove non-match possibility */
               next_active_state--;


Thanks for the nice clear report.

--
You are receiving this mail because:
You are on the CC list for the bug.