mirror of
https://github.com/RPCSX/llvm.git
synced 2025-02-04 03:17:51 +00:00
[libFuzzer] don't create large random mutations when given an empty seed
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@290634 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
834b93c09f
commit
8f45dd30a7
@ -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 < MaxSize; i++)
|
||||
for (size_t i = 0; i < Min(size_t(4), MaxSize); i++)
|
||||
Data[i] = RandCh(Rand);
|
||||
if (Options.OnlyASCII)
|
||||
ToASCII(Data, MaxSize);
|
||||
|
Loading…
x
Reference in New Issue
Block a user