LLVM  3.7.0
DFSanMemcmpTest.cpp
Go to the documentation of this file.
1 // Simple test for a fuzzer. The fuzzer must find a particular string.
2 #include <cstring>
3 #include <cstdint>
4 #include <cstdio>
5 #include <cstdlib>
6 
7 extern "C" void LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) {
8  if (Size >= 8 && memcmp(Data, "01234567", 8) == 0) {
9  fprintf(stderr, "BINGO\n");
10  exit(1);
11  }
12 }
void LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size)