1 // This file is distributed under the University of Illinois Open Source
2 // License. See LICENSE.TXT for details.
4 // Test that libFuzzer itself does not read out of bounds.
12 static volatile int Sink;
14 extern "C" int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) {
15 if (Size < 5) return 0;
16 const char *Ch = reinterpret_cast<const char *>(Data);
17 if (Ch[Size - 3] == 'a')
18 Sink = strncmp(Ch + Size - 3, "abcdefg", 6);