summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Fuzzer
diff options
context:
space:
mode:
authorKostya Serebryany <kcc@google.com>2017-05-15 17:39:42 +0000
committerKostya Serebryany <kcc@google.com>2017-05-15 17:39:42 +0000
commite8a49b38508fac85b065bb8e174d46bb566036ef (patch)
tree1c04eaa8a772ca424d2c7253e92cc405e745bba7 /llvm/lib/Fuzzer
parent6da813336cc5f7f64d4771d3528fea05209e1844 (diff)
downloadbcm5719-llvm-e8a49b38508fac85b065bb8e174d46bb566036ef.tar.gz
bcm5719-llvm-e8a49b38508fac85b065bb8e174d46bb566036ef.zip
[libFuzzer] fix a warning from Wunreachable-code-loop-increment reported by Christian Holler. This also fixes a logical bug, which however does not affect the libFuzzer's ability too much (I wasn't able to create a differentiating test)
llvm-svn: 303087
Diffstat (limited to 'llvm/lib/Fuzzer')
-rw-r--r--llvm/lib/Fuzzer/FuzzerMutate.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Fuzzer/FuzzerMutate.cpp b/llvm/lib/Fuzzer/FuzzerMutate.cpp
index a84e6eeb42a..e60d4130de1 100644
--- a/llvm/lib/Fuzzer/FuzzerMutate.cpp
+++ b/llvm/lib/Fuzzer/FuzzerMutate.cpp
@@ -222,7 +222,7 @@ DictionaryEntry MutationDispatcher::MakeDictionaryEntryFromCMP(
if (!Cur) break;
Positions[NumPositions++] = Cur - Data;
}
- if (!NumPositions) break;
+ if (!NumPositions) continue;
return DictionaryEntry(W, Positions[Rand(NumPositions)]);
}
DictionaryEntry DE(W);
OpenPOWER on IntegriCloud