diff options
| -rw-r--r-- | sapi/fuzzer/fuzzer-parser.c | 9 | ||||
| -rw-r--r-- | sapi/fuzzer/fuzzer-sapi.c | 1 |
2 files changed, 8 insertions, 2 deletions
diff --git a/sapi/fuzzer/fuzzer-parser.c b/sapi/fuzzer/fuzzer-parser.c index 70039d5085..155bd991cc 100644 --- a/sapi/fuzzer/fuzzer-parser.c +++ b/sapi/fuzzer/fuzzer-parser.c @@ -26,7 +26,14 @@ #include "fuzzer-sapi.h" int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) { - char *s = malloc(Size+1); + char *s; + if (Size > 64 * 1024) { + /* Large inputs have a large impact on fuzzer performance, + * but are unlikely to be necessary to reach new codepaths. */ + return 0; + } + + s = malloc(Size+1); memcpy(s, Data, Size); s[Size] = '\0'; diff --git a/sapi/fuzzer/fuzzer-sapi.c b/sapi/fuzzer/fuzzer-sapi.c index 0889d7b27c..679c16c356 100644 --- a/sapi/fuzzer/fuzzer-sapi.c +++ b/sapi/fuzzer/fuzzer-sapi.c @@ -32,7 +32,6 @@ const char HARDCODED_INI[] = "html_errors=0\n" "implicit_flush=1\n" - "max_execution_time=20\n" "output_buffering=0\n" "error_reporting=0"; |
