[pcre-dev] [Bug 732] lazy matching (*?) fails with unicode

Inizio della pagina
Delete this message
Autore: Philip Hazel
Data:  
To: pcre-dev
Oggetto: [pcre-dev] [Bug 732] lazy matching (*?) fails with unicode
------- You are receiving this mail because: -------
You are on the CC list for the bug.

http://bugs.exim.org/show_bug.cgi?id=732

Philip Hazel <ph10@???> changed:

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





--- Comment #1 from Philip Hazel <ph10@???> 2008-07-14 16:54:29 ---
I have fixed this bug and committed the patch, which is short, so here it is if
anyone needs it before the next release:

--- pcre_exec.c (revision 345)
+++ pcre_exec.c (working copy)
@@ -2585,10 +2609,11 @@
             {
             RMATCH(eptr, ecode, offset_top, md, ims, eptrb, 0, RM28);
             if (rrc != MATCH_NOMATCH) RRETURN(rrc);
+            if (fi >= max || eptr >= md->end_subject) RRETURN(MATCH_NOMATCH);
             GETCHARINC(d, eptr);
             if (d < 256) d = md->lcc[d];
-            if (fi >= max || eptr >= md->end_subject || fc == d)
-              RRETURN(MATCH_NOMATCH);
+            if (fc == d) RRETURN(MATCH_NOMATCH);
+ 
             }
           }
         else
@@ -2694,9 +2719,9 @@
             {
             RMATCH(eptr, ecode, offset_top, md, ims, eptrb, 0, RM32);
             if (rrc != MATCH_NOMATCH) RRETURN(rrc);
+            if (fi >= max || eptr >= md->end_subject) RRETURN(MATCH_NOMATCH);
             GETCHARINC(d, eptr);
-            if (fi >= max || eptr >= md->end_subject || fc == d)
-              RRETURN(MATCH_NOMATCH);
+            if (fc == d) RRETURN(MATCH_NOMATCH); 
             }
           }
         else



--
Configure bugmail: http://bugs.exim.org/userprefs.cgi?tab=email