OSDN Git Service
(root)
/
android-x86
/
external-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
834b93c
)
[libFuzzer] don't create large random mutations when given an empty seed
author
Kostya Serebryany
<kcc@google.com>
Tue, 27 Dec 2016 22:15:04 +0000
(22:15 +0000)
committer
Kostya Serebryany
<kcc@google.com>
Tue, 27 Dec 2016 22:15:04 +0000
(22:15 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@290634
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/Fuzzer/FuzzerMutate.cpp
patch
|
blob
|
history
diff --git
a/lib/Fuzzer/FuzzerMutate.cpp
b/lib/Fuzzer/FuzzerMutate.cpp
index
80b7a5f
..
96a87b8
100644
(file)
--- a/
lib/Fuzzer/FuzzerMutate.cpp
+++ b/
lib/Fuzzer/FuzzerMutate.cpp
@@
-486,7
+486,7
@@
size_t MutationDispatcher::MutateImpl(uint8_t *Data, size_t Size,
const std::vector<Mutator> &Mutators) {
assert(MaxSize > 0);
if (Size == 0) {
- for (size_t i = 0; i < M
axSize
; i++)
+ for (size_t i = 0; i < M
in(size_t(4), MaxSize)
; i++)
Data[i] = RandCh(Rand);
if (Options.OnlyASCII)
ToASCII(Data, MaxSize);