From 872a759f88f258bd9b331d36629796b551588d1c Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Tue, 1 Oct 2019 18:29:23 +0200 Subject: [PATCH] Limit input size in exif fuzzer Probably still too much... --- sapi/fuzzer/fuzzer-exif.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sapi/fuzzer/fuzzer-exif.c b/sapi/fuzzer/fuzzer-exif.c index 0bcffbb3348..6591a688887 100644 --- a/sapi/fuzzer/fuzzer-exif.c +++ b/sapi/fuzzer/fuzzer-exif.c @@ -35,6 +35,12 @@ int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) { char *filename; int filedes; + if (Size > 256 * 1024) { + /* Large inputs have a large impact on fuzzer performance, + * but are unlikely to be necessary to reach new codepaths. */ + return 0; + } + if (fuzzer_request_startup() == FAILURE) { return 0; }