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.
This commit is contained in:
@@ -73,7 +73,7 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
|
||||
struct in6_addr hint = { { { 0x3f, 0xfe, 0x05, 0x01, 0xff, 0xff, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } } };
|
||||
static const char *v1_data = "hogehoge", *v2_data = "foobar";
|
||||
|
||||
if (size > 65536)
|
||||
if (outside_size_range(size, 0, 65536))
|
||||
return 0;
|
||||
|
||||
assert_se(sd_event_new(&e) >= 0);
|
||||
|
||||
@@ -23,7 +23,7 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
|
||||
_cleanup_(sd_event_unrefp) sd_event *e = NULL;
|
||||
_cleanup_(sd_lldp_rx_unrefp) sd_lldp_rx *lldp_rx = NULL;
|
||||
|
||||
if (size > 2048)
|
||||
if (outside_size_range(size, 0, 2048))
|
||||
return 0;
|
||||
|
||||
assert_se(sd_event_new(&e) == 0);
|
||||
|
||||
@@ -43,7 +43,7 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
|
||||
_cleanup_(sd_event_unrefp) sd_event *e = NULL;
|
||||
_cleanup_(sd_ndisc_unrefp) sd_ndisc *nd = NULL;
|
||||
|
||||
if (size > 2048)
|
||||
if (outside_size_range(size, 0, 2048))
|
||||
return 0;
|
||||
|
||||
assert_se(sd_event_new(&e) >= 0);
|
||||
|
||||
Reference in New Issue
Block a user