Skip to content

Commit

Permalink
separating out the 32-bit and 64-bit fuzzers
Browse files Browse the repository at this point in the history
  • Loading branch information
lemire committed Oct 2, 2024
1 parent b8d62f9 commit 08fc3ce
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions fuzz/croaring_fuzzer.c
Original file line number Diff line number Diff line change
Expand Up @@ -77,15 +77,12 @@ int bitmap64(const char *data, size_t size) {
}
return 0;
}

int LLVMFuzzerTestOneInput(const char *data, size_t size) {
int r;
r = bitmap32(data, size);
if (r) {
return r;
}
r = bitmap64(data, size);
if (r) {
return r;
if (size == 0) { return 0; }
if (data[0] % 2 == 0) {
return bitmap32(data + 1, size - 1);
} else {
return bitmap64(data + 1, size - 1);
}
return 0;
}

0 comments on commit 08fc3ce

Please sign in to comment.