Created attachment 473362 [details] Fix for looping on pattern compilation in non-UTF-8 I believe I found fix for the loop problem. This attachment should fix it.
Created attachment 473363 [details] Fix for looping on pattern compilation in non-UTF-8 I believe I found fix for the loop problem. This attachment should fix it.
Created attachment 473365 [details] Test case for the loop problem This C program tests the loop problem. If the problem is fixed, the program returns with success code in finite time. Otherwise it times out after 5 seconds and returns failure code.
Created attachment 473502 [details] Complete backport of infinite loop bugfix
Your backport seem to be incomplete. I attached more complete backport. Test case which shows the difference is to change this pattern to test program: const char pattern[] = "/ ([\\p{Nd}]) (abc) (?2) /";
Created attachment 473857 [details] Fix for looping on pattern compilation in non-UTF-8 Annotated patch fixing both recursion and both bracket search.
Created attachment 473858 [details] Test case for the loop problem Test case with both mentioned patterns.
(In reply to comment #7) > Your backport seem to be incomplete. > Thank you very much. I would welcome a pointer to relevant discussion or VCS repository as upstream moved to new VCS and mailing list at the begin of year 2007 throwing previous development history away. I checked whole pcre_compile.c for OP_XCLASS against pcre-6.7. I hope that's everything.
No idea about VCS link or anything. Second test pattern was invented by Kim Heino when he looked at your backport and why our backport was different than your original one.
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. http://rhn.redhat.com/errata/RHBA-2013-1298.html