Skip to content

Commit bd21e20

Browse files
committed
Reduce oniguruma limits in fuzzing sapi
The defaults are fairly conservative and may still take quite a bit to match a single expression. Reduce them by a factor of 10x to speed up fuzzing.
1 parent a32f130 commit bd21e20

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

sapi/fuzzer/fuzzer-sapi.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,10 @@ const char HARDCODED_INI[] =
3333
"html_errors=0\n"
3434
"implicit_flush=1\n"
3535
"output_buffering=0\n"
36-
"error_reporting=0";
36+
"error_reporting=0\n"
37+
/* Reduce oniguruma limits by a factor of 10 to speed up fuzzing */
38+
"mbstring.regex_stack_limit=10000\n"
39+
"mbstring.regex_retry_limit=100000";
3740

3841
static int startup(sapi_module_struct *sapi_module)
3942
{

0 commit comments

Comments
 (0)