summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Fuzzer/test/SimpleDictionaryTest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Fuzzer/test/SimpleDictionaryTest.cpp')
-rw-r--r--llvm/lib/Fuzzer/test/SimpleDictionaryTest.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/llvm/lib/Fuzzer/test/SimpleDictionaryTest.cpp b/llvm/lib/Fuzzer/test/SimpleDictionaryTest.cpp
index 20c80674366..b9cb2f0270a 100644
--- a/llvm/lib/Fuzzer/test/SimpleDictionaryTest.cpp
+++ b/llvm/lib/Fuzzer/test/SimpleDictionaryTest.cpp
@@ -10,9 +10,9 @@
static volatile int Zero = 0;
-extern "C" void LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) {
+extern "C" int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) {
const char *Expected = "ElvisPresley";
- if (Size < strlen(Expected)) return;
+ if (Size < strlen(Expected)) return 0;
size_t Match = 0;
for (size_t i = 0; Expected[i]; i++)
if (Expected[i] + Zero == Data[i])
@@ -21,5 +21,6 @@ extern "C" void LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) {
std::cout << "BINGO; Found the target, exiting\n";
exit(1);
}
+ return 0;
}
OpenPOWER on IntegriCloud