Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(439)

Unified Diff: net/socket/socks5_client_socket_fuzzer.cc

Issue 1917503002: URLRequest fuzzer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@fuzz
Patch Set: Add missing include Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: net/socket/socks5_client_socket_fuzzer.cc
diff --git a/net/socket/socks5_client_socket_fuzzer.cc b/net/socket/socks5_client_socket_fuzzer.cc
index 8bbc7fce6e3c8508374bf9c26a7a328f5a790419..3c0864c75ed11d84eff67ebe28c317ae8fd36100 100644
--- a/net/socket/socks5_client_socket_fuzzer.cc
+++ b/net/socket/socks5_client_socket_fuzzer.cc
@@ -9,6 +9,7 @@
#include "base/logging.h"
#include "net/base/address_list.h"
+#include "net/base/fuzzed_data_provider.h"
#include "net/base/net_errors.h"
#include "net/base/test_completion_callback.h"
#include "net/log/test_net_log.h"
@@ -23,11 +24,13 @@
// class for details.
extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
// Use a test NetLog, to exercise logging code.
- net::BoundTestNetLog bound_test_net_log;
+ net::TestNetLog test_net_log;
+
+ net::FuzzedDataProvider data_provider(data, size);
net::TestCompletionCallback callback;
std::unique_ptr<net::FuzzedSocket> fuzzed_socket(
- new net::FuzzedSocket(data, size, bound_test_net_log.bound()));
+ new net::FuzzedSocket(&data_provider, &test_net_log));
CHECK_EQ(net::OK, fuzzed_socket->Connect(callback.callback()));
std::unique_ptr<net::ClientSocketHandle> socket_handle(

Powered by Google App Engine
This is Rietveld 408576698