diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2022-05-12 12:51:11 +0200 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2022-05-12 14:57:07 +0200 |
commit | c4f883b78e5ffd326a82eaf18e01a9e4e243db58 (patch) | |
tree | 712faa735096321206f0afd6097a4dd09bfcd6c1 /src/xdg-autostart-generator | |
parent | fuzzers: add input size limits, always configure limits in two ways (diff) | |
download | systemd-c4f883b78e5ffd326a82eaf18e01a9e4e243db58.tar.xz systemd-c4f883b78e5ffd326a82eaf18e01a9e4e243db58.zip |
fuzzers: ignore size limits when compiled standalone
This way we can still call fuzzers on old samples, but oss-fuzz will not waste
its and our time finding overly large inputs.
Diffstat (limited to 'src/xdg-autostart-generator')
-rw-r--r-- | src/xdg-autostart-generator/fuzz-xdg-desktop.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/xdg-autostart-generator/fuzz-xdg-desktop.c b/src/xdg-autostart-generator/fuzz-xdg-desktop.c index 0ae27fc39d..084c907307 100644 --- a/src/xdg-autostart-generator/fuzz-xdg-desktop.c +++ b/src/xdg-autostart-generator/fuzz-xdg-desktop.c @@ -17,7 +17,7 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { _cleanup_(xdg_autostart_service_freep) XdgAutostartService *service = NULL; _cleanup_(rm_rf_physical_and_freep) char *tmpdir = NULL; - if (size > 65536) + if (outside_size_range(size, 0, 65536)) return 0; /* We don't want to fill the logs with messages about parse errors. |