fuzz: limit size for fuzz-manager-serialize

Fixes #29357 and oss-fuzz#62756
(https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=62756).
This commit is contained in:
Yu Watanabe
2023-10-02 14:23:34 +01:00
committed by Luca Boccassi
parent 1e5e902f60
commit 7233c679d4
2 changed files with 5 additions and 0 deletions
+3
View File
@@ -14,6 +14,9 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
_cleanup_fclose_ FILE *f = NULL, *null = NULL;
_cleanup_fdset_free_ FDSet *fdset = NULL;
if (outside_size_range(size, 0, 65536))
return 0;
/* We don't want to fill the logs with messages about parse errors.
* Disable most logging if not running standalone. */
if (!getenv("SYSTEMD_LOG_LEVEL")) {
+2
View File
@@ -0,0 +1,2 @@
[libfuzzer]
max_len = 65536