From 51fc14b6b9208eea369695803faabd38fc6376d5 Mon Sep 17 00:00:00 2001 From: Kostya Serebryany Date: Mon, 15 May 2017 17:39:42 +0000 Subject: [PATCH] [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) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303087 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Fuzzer/FuzzerMutate.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Fuzzer/FuzzerMutate.cpp b/lib/Fuzzer/FuzzerMutate.cpp index a84e6ee..e60d413 100644 --- a/lib/Fuzzer/FuzzerMutate.cpp +++ b/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); -- 2.34.1