summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Fuzzer/test/SimpleHashTest.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/SimpleHashTest.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/SimpleHashTest.cpp')
-rw-r--r--llvm/lib/Fuzzer/test/SimpleHashTest.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Fuzzer/test/SimpleHashTest.cpp b/llvm/lib/Fuzzer/test/SimpleHashTest.cpp
index 99e96cb25dc..a3f4211ebee 100644
--- a/llvm/lib/Fuzzer/test/SimpleHashTest.cpp
+++ b/llvm/lib/Fuzzer/test/SimpleHashTest.cpp
@@ -26,7 +26,7 @@ static uint32_t simple_hash(const uint8_t *Data, size_t Size) {
}
extern "C" int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) {
- if (Size < 14)
+ if (Size < 14 || Size > 64)
return 0;
uint32_t Hash = simple_hash(&Data[0], Size - 4);
OpenPOWER on IntegriCloud