aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Fuzzer/test/SimpleTest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Fuzzer/test/SimpleTest.cpp')
-rw-r--r--llvm/lib/Fuzzer/test/SimpleTest.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/Fuzzer/test/SimpleTest.cpp b/llvm/lib/Fuzzer/test/SimpleTest.cpp
index 6811d11..04225a8 100644
--- a/llvm/lib/Fuzzer/test/SimpleTest.cpp
+++ b/llvm/lib/Fuzzer/test/SimpleTest.cpp
@@ -1,4 +1,5 @@
// Simple test for a fuzzer. The fuzzer must find the string "Hi!".
+#include <assert.h>
#include <cstdint>
#include <cstdlib>
#include <cstddef>
@@ -7,6 +8,7 @@
static volatile int Sink;
extern "C" int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) {
+ assert(Data);
if (Size > 0 && Data[0] == 'H') {
Sink = 1;
if (Size > 1 && Data[1] == 'i') {