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

Unified Diff: net/url_request/url_request_data_job_fuzzer.cc

Issue 1946793002: net: Add fuzzer for HostResolverImpl. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove port 0 check Created 4 years, 7 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
« no previous file with comments | « net/udp/fuzzed_datagram_client_socket.cc ('k') | tools/valgrind/memcheck/suppressions.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/url_request/url_request_data_job_fuzzer.cc
diff --git a/net/url_request/url_request_data_job_fuzzer.cc b/net/url_request/url_request_data_job_fuzzer.cc
index c99a5a0cfe05ac0d6d06a3d1c593f47355bbc52f..5a0987c909d17a0a8f18eb556f8aaef8de3953a3 100644
--- a/net/url_request/url_request_data_job_fuzzer.cc
+++ b/net/url_request/url_request_data_job_fuzzer.cc
@@ -43,7 +43,7 @@ class URLRequestDataJobFuzzerHarness : public net::URLRequest::Delegate {
read_lengths_.clear();
// Allocate an IOBuffer with fuzzed size.
- uint32_t buf_size = provider.ConsumeValueInRange(1, 127); // 7 bits.
+ uint32_t buf_size = provider.ConsumeUint32InRange(1, 127); // 7 bits.
scoped_refptr<net::IOBuffer> buf(
new net::IOBuffer(static_cast<size_t>(buf_size)));
buf_.swap(buf);
@@ -58,7 +58,7 @@ class URLRequestDataJobFuzzerHarness : public net::URLRequest::Delegate {
// Generate a sequence of reads sufficient to read the entire data URL.
size_t simulated_bytes_read = 0;
while (simulated_bytes_read < provider.remaining_bytes()) {
- size_t read_length = provider.ConsumeValueInRange(1, buf_size);
+ size_t read_length = provider.ConsumeUint32InRange(1, buf_size);
read_lengths_.push_back(read_length);
simulated_bytes_read += read_length;
}
« no previous file with comments | « net/udp/fuzzed_datagram_client_socket.cc ('k') | tools/valgrind/memcheck/suppressions.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698