Skip to content

Commit

Permalink
Fix yet another fuzz support oversight; add a test for a recent JIT fix
Browse files Browse the repository at this point in the history
  • Loading branch information
PhilipHazel committed Mar 21, 2024
1 parent 994536c commit 0913934
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/pcre2_fuzzsupport.c
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,9 @@ if (size > 3)
{
if (wdata[j] == ' ' || wdata[j] == '\t')
{
do j++; while (j < size && (wdata[j] == ' ' || wdata[j] == '\t'));
j++;
while (j < size && (wdata[j] == ' ' || wdata[j] == '\t')) j++;
if (j >= size) goto OUTERLOOP;
if (wdata[j] != '}' && wdata[j] != ',') goto OUTERLOOP;
}
if (wdata[j] == '}' || (ii == 0 && wdata[j] == ',')) break;
Expand Down
5 changes: 5 additions & 0 deletions testdata/testinput2
Original file line number Diff line number Diff line change
Expand Up @@ -6102,5 +6102,10 @@ a)"xI
/(((?<=123?456456|ABC)))(?<=\2)../
ABCDEFG
12345645678910

# This test is crashing Perl 5.38.2.

/[^\S\W]{6}/
.abc def..

# End of testinput2
6 changes: 6 additions & 0 deletions testdata/testoutput2
Original file line number Diff line number Diff line change
Expand Up @@ -18047,6 +18047,12 @@ Failed: error -47: match limit exceeded
0: 78
1:
2:

# This test is crashing Perl 5.38.2.

/[^\S\W]{6}/
.abc def..
No match

# End of testinput2
Error -70: PCRE2_ERROR_BADDATA (unknown error number)
Expand Down

0 comments on commit 0913934

Please sign in to comment.