Skip to content
This repository has been archived by the owner on Oct 11, 2023. It is now read-only.

#Centipede add one more bug to multi_sanitizer_fuzz_target.cc #281

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions testing/multi_sanitizer_fuzz_target.cc
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
#include <thread> // NOLINT

[[maybe_unused]] static volatile void *sink;
[[maybe_unused]] static volatile int int_sink;

extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
if (size != 3) return 0; // Make bugs easy to discover.
Expand All @@ -45,5 +46,9 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
++racy_var;
t.join();
}
// mcm => buffer overflow inside memcmp
if (data[0] == 'm' && data[1] == 'c' && data[2] == 'm') {
int_sink = memcmp(data, "mcm123", 6);
}
return 0;
}