summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Fuzzer/test/SingleStrncmpTest.cpp
diff options
context:
space:
mode:
authorKostya Serebryany <kcc@google.com>2017-07-19 23:45:46 +0000
committerKostya Serebryany <kcc@google.com>2017-07-19 23:45:46 +0000
commita168af7b5fa5143e511aac50fe3782f8da12ab3a (patch)
tree4e109a34f561f86de3a1afbd79e6cf89e059763b /llvm/lib/Fuzzer/test/SingleStrncmpTest.cpp
parent388f88070eaefaab233f7aeaca98987fd7b042b0 (diff)
downloadbcm5719-llvm-a168af7b5fa5143e511aac50fe3782f8da12ab3a.tar.gz
bcm5719-llvm-a168af7b5fa5143e511aac50fe3782f8da12ab3a.zip
[libFuzzer] change several tests to not limit the max len: with reduce_inputs=1 they are now fast enough even w/o this
llvm-svn: 308553
Diffstat (limited to 'llvm/lib/Fuzzer/test/SingleStrncmpTest.cpp')
-rw-r--r--llvm/lib/Fuzzer/test/SingleStrncmpTest.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/llvm/lib/Fuzzer/test/SingleStrncmpTest.cpp b/llvm/lib/Fuzzer/test/SingleStrncmpTest.cpp
index b38c7995d8f..47298763f28 100644
--- a/llvm/lib/Fuzzer/test/SingleStrncmpTest.cpp
+++ b/llvm/lib/Fuzzer/test/SingleStrncmpTest.cpp
@@ -8,8 +8,7 @@
#include <cstring>
extern "C" int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) {
- if (Size > 64) return 0;
- char *S = (char*)Data;
+ const char *S = (const char*)Data;
volatile auto Strncmp = &(strncmp); // Make sure strncmp is not inlined.
if (Size >= 6 && !Strncmp(S, "qwerty", 6)) {
fprintf(stderr, "BINGO\n");
OpenPOWER on IntegriCloud