com php-src: Reduce oniguruma limits in fuzzing sapi: sapi/fuzzer/fuzzer-sapi.c
| From: | Nikita Popov | Date: | Tue, 08 Oct 2019 15:38:49 +0000 |
| Subject: | com php-src: Reduce oniguruma limits in fuzzing sapi: sapi/fuzzer/fuzzer-sapi.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-108816@lists.php.net to get a copy of this message | ||
Commit: bd21e202b9fa56102cc292b0c5fcc2f22377d850
Author: Nikita Popov <nikita.ppv@gmail.com> Tue, 8 Oct 2019 17:38:49 +0200
Parents: a32f130f9420a876381b7f9042855dad9445bbef
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=bd21e202b9fa56102cc292b0c5fcc2f22377d850
Log:
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.
Changed paths:
M sapi/fuzzer/fuzzer-sapi.c
Diff:
diff --git a/sapi/fuzzer/fuzzer-sapi.c b/sapi/fuzzer/fuzzer-sapi.c
index 679c16c356f..fb552974e8d 100644
--- a/sapi/fuzzer/fuzzer-sapi.c
+++ b/sapi/fuzzer/fuzzer-sapi.c
@@ -33,7 +33,10 @@ const char HARDCODED_INI[] =
"html_errors=0\n"
"implicit_flush=1\n"
"output_buffering=0\n"
- "error_reporting=0";
+ "error_reporting=0\n"
+ /* Reduce oniguruma limits by a factor of 10 to speed up fuzzing */
+ "mbstring.regex_stack_limit=10000\n"
+ "mbstring.regex_retry_limit=100000";
static int startup(sapi_module_struct *sapi_module)
{