We're getting some very large inputs (~500KB) on OSS-Fuzz, which
slot down performance a lot. Let's try limiting this, starting
with a still fairly large value of 64KB.
Also remove the max_execution_time limit, so that slow test cases
cause a genuine libfuzzer timeout and we may investigate them.
#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';
const char HARDCODED_INI[] =
"html_errors=0\n"
"implicit_flush=1\n"
- "max_execution_time=20\n"
"output_buffering=0\n"
"error_reporting=0";