Migrate the rest of fuzz targets to the new FuzzedDataProvider.
Mostly mechanical changes to use another header and a class from the
global namespace. Also had to modify several DEPS files to add a
specific include rule allowing .*fuzz.* files to include the header
having FuzzedDataProvider defined.
smb_url_fuzzer and lnk_parser_fuzzer didn't really need to use
FuzzedDataProvider, so I removed that dependency from them.
Also slightly updated the documentation to mention the upstream
FuzzedDataProvider doc and point out the use cases when that auxiliary
class isn't actually needed.
Bug: 907103
Change-Id: If9785017d4581716233bfaf714d28d0816114ffc
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1678283
Commit-Queue: Scott Violet <[email protected]>
Reviewed-by: Scott Violet <[email protected]>
Reviewed-by: Jonathan Metzman <[email protected]>
Auto-Submit: Max Moroz <[email protected]>
Cr-Commit-Position: refs/heads/master@{#673876}
diff --git a/base/pickle_fuzzer.cc b/base/pickle_fuzzer.cc
index 8bd0177..76372fe 100644
--- a/base/pickle_fuzzer.cc
+++ b/base/pickle_fuzzer.cc
@@ -4,7 +4,7 @@
#include "base/macros.h"
#include "base/pickle.h"
-#include "base/test/fuzzed_data_provider.h"
+#include "third_party/libFuzzer/src/utils/FuzzedDataProvider.h"
namespace {
constexpr int kIterations = 16;
@@ -20,7 +20,7 @@
}
// Use the first kReadControlBytes bytes of the fuzzer input to control how
// the pickled data is read.
- base::FuzzedDataProvider data_provider(data, kReadControlBytes);
+ FuzzedDataProvider data_provider(data, kReadControlBytes);
data += kReadControlBytes;
size -= kReadControlBytes;