summaryrefslogtreecommitdiffstats
path: root/gnu/llvm/lib/Fuzzer/test/LoadTest.cpp
diff options
context:
space:
mode:
authorpatrick <patrick@openbsd.org>2017-10-04 20:27:34 +0000
committerpatrick <patrick@openbsd.org>2017-10-04 20:27:34 +0000
commit31eb748944903b7f4f38afda9851951ca9dfc1ae (patch)
tree9b95b6ea45d0874d75eb05b90c0840e191416439 /gnu/llvm/lib/Fuzzer/test/LoadTest.cpp
parentDon't try to handle IPv4-compatible IPv6 addresses (diff)
downloadwireguard-openbsd-31eb748944903b7f4f38afda9851951ca9dfc1ae.tar.xz
wireguard-openbsd-31eb748944903b7f4f38afda9851951ca9dfc1ae.zip
Import LLVM 5.0.0 release including clang, lld and lldb.
Diffstat (limited to 'gnu/llvm/lib/Fuzzer/test/LoadTest.cpp')
-rw-r--r--gnu/llvm/lib/Fuzzer/test/LoadTest.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/gnu/llvm/lib/Fuzzer/test/LoadTest.cpp b/gnu/llvm/lib/Fuzzer/test/LoadTest.cpp
index c1780d5c7bd..67a28c7cb22 100644
--- a/gnu/llvm/lib/Fuzzer/test/LoadTest.cpp
+++ b/gnu/llvm/lib/Fuzzer/test/LoadTest.cpp
@@ -3,9 +3,9 @@
// Simple test for a fuzzer: find interesting value of array index.
#include <assert.h>
+#include <cstddef>
#include <cstdint>
#include <cstring>
-#include <cstddef>
#include <iostream>
static volatile int Sink;
@@ -14,7 +14,7 @@ int array[kArraySize];
extern "C" int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) {
if (Size < 8) return 0;
- size_t a = 0;
+ uint64_t a = 0;
memcpy(&a, Data, 8);
Sink = array[a % (kArraySize + 1)];
return 0;