summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Fuzzer/test/SingleStrncmpTest.cpp
diff options
context:
space:
mode:
authorKostya Serebryany <kcc@google.com>2017-06-15 22:43:40 +0000
committerKostya Serebryany <kcc@google.com>2017-06-15 22:43:40 +0000
commit589eae515e82e1f382ddf83984d6418a347d7f3a (patch)
treeec7178cd688a6188dbd4afacfdad03be77d4df01 /llvm/lib/Fuzzer/test/SingleStrncmpTest.cpp
parent56ed9deafcf05f65978f62715125e2210f59607e (diff)
downloadbcm5719-llvm-589eae515e82e1f382ddf83984d6418a347d7f3a.tar.gz
bcm5719-llvm-589eae515e82e1f382ddf83984d6418a347d7f3a.zip
[libFuzzer] change the default max_len from 64 to 4096. This will affect cases where libFuzzer is run w/o initial corpus or with a corpus of very small items.
llvm-svn: 305521
Diffstat (limited to 'llvm/lib/Fuzzer/test/SingleStrncmpTest.cpp')
-rw-r--r--llvm/lib/Fuzzer/test/SingleStrncmpTest.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/llvm/lib/Fuzzer/test/SingleStrncmpTest.cpp b/llvm/lib/Fuzzer/test/SingleStrncmpTest.cpp
index b302670fb74..b38c7995d8f 100644
--- a/llvm/lib/Fuzzer/test/SingleStrncmpTest.cpp
+++ b/llvm/lib/Fuzzer/test/SingleStrncmpTest.cpp
@@ -8,6 +8,7 @@
#include <cstring>
extern "C" int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) {
+ if (Size > 64) return 0;
char *S = (char*)Data;
volatile auto Strncmp = &(strncmp); // Make sure strncmp is not inlined.
if (Size >= 6 && !Strncmp(S, "qwerty", 6)) {
OpenPOWER on IntegriCloud