Skip to content

Commit

Permalink
Fix an edge case bug in fuzz support; it missed the quantifier in seq…
Browse files Browse the repository at this point in the history
…uences like "){9){123}", causing a JIT timeout.
  • Loading branch information
PhilipHazel committed Apr 19, 2024
1 parent cbff6bb commit 1649c76
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/pcre2_fuzzsupport.c
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,11 @@ if (size > 3)
if (wdata[j] != '}' && wdata[j] != ',') goto OUTERLOOP;
}
if (wdata[j] == '}' || (ii == 0 && wdata[j] == ',')) break;
if (wdata[j] < '0' || wdata[j] > '9') goto OUTERLOOP;
if (wdata[j] < '0' || wdata[j] > '9')
{
j--; /* Ensure this character is checked next. The */
goto OUTERLOOP; /* string might be (e.g.) "){9){234}" */
}
q = q * 10 + wdata[j] - '0';
}

Expand Down

0 comments on commit 1649c76

Please sign in to comment.