mirror of
https://github.com/morgan9e/systemd
synced 2026-04-14 08:25:20 +09:00
fuzz-dhcp6-client: avoid assertion failure on samples which dont fit in pipe
Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=11584.
This commit is contained in:
committed by
Lennart Poettering
parent
965bfcd6b2
commit
55ac7b6314
@@ -49,6 +49,9 @@ static void fuzz_client(const uint8_t *data, size_t size, bool is_information_re
|
||||
}
|
||||
|
||||
int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
|
||||
if (size > 65536)
|
||||
return 0;
|
||||
|
||||
/* This triggers client_receive_advertise */
|
||||
fuzz_client(data, size, false);
|
||||
|
||||
|
||||
2
src/fuzz/fuzz-dhcp6-client.options
Normal file
2
src/fuzz/fuzz-dhcp6-client.options
Normal file
@@ -0,0 +1,2 @@
|
||||
[libfuzzer]
|
||||
max_len = 65536
|
||||
Reference in New Issue
Block a user