File 0001-Fixed-atomic-group-backtracking-bug.patch of Package pcre2.29905

Index: pcre2-10.31/src/pcre2_match.c
===================================================================
--- pcre2-10.31.orig/src/pcre2_match.c
+++ pcre2-10.31/src/pcre2_match.c
@@ -5501,7 +5501,7 @@ fprintf(stderr, "++ op=%d\n", *Fecode);
       frame so that it points to the final branch. */
 
       case OP_ONCE:
-      Fback_frame = ((char *)F - (char *)P) + frame_size;
+      Fback_frame = ((char *)F - (char *)P);
       for (;;)
         {
         uint32_t y = GET(P->ecode,1);
Index: pcre2-10.31/testdata/testinput1
===================================================================
--- pcre2-10.31.orig/testdata/testinput1
+++ pcre2-10.31/testdata/testinput1
@@ -6189,4 +6189,10 @@ ef) x/x,mark
 /(?=a+)a(a+)++b/
     aab
 
+/(?>a(*:1))(?>b(*:1))(*SKIP:1)x|.*/no_start_optimize
+    abc
+
+/(?>a(*:1))(?>b)(*SKIP:1)x|.*/no_start_optimize
+    abc
+
 # End of testinput1 
Index: pcre2-10.31/testdata/testoutput1
===================================================================
--- pcre2-10.31.orig/testdata/testoutput1
+++ pcre2-10.31/testdata/testoutput1
@@ -9822,4 +9822,12 @@ No match
  0: aab
  1: a
 
+/(?>a(*:1))(?>b(*:1))(*SKIP:1)x|.*/no_start_optimize
+    abc
+ 0: abc
+
+/(?>a(*:1))(?>b)(*SKIP:1)x|.*/no_start_optimize
+    abc
+ 0: abc
+
 # End of testinput1 
openSUSE Build Service is sponsored by