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

Unified Diff: tools/ipc_fuzzer/fuzzer/fuzzer.cc

Issue 2881673002: Avoid heap allocations in IPAddress (Closed)
Patch Set: More fixes Created 3 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
Index: tools/ipc_fuzzer/fuzzer/fuzzer.cc
diff --git a/tools/ipc_fuzzer/fuzzer/fuzzer.cc b/tools/ipc_fuzzer/fuzzer/fuzzer.cc
index a8d3c6c4f3801901bf88ad6839c9abca5a47afdd..fbcb8e913b2a0c7f7f162135028857f0d5ec0eb3 100644
--- a/tools/ipc_fuzzer/fuzzer/fuzzer.cc
+++ b/tools/ipc_fuzzer/fuzzer/fuzzer.cc
@@ -1291,7 +1291,7 @@ struct FuzzTraits<net::HostPortPair> {
template <>
struct FuzzTraits<net::IPAddress> {
static bool Fuzz(net::IPAddress* p, Fuzzer* fuzzer) {
- std::vector<uint8_t> bytes = p->bytes();
+ std::vector<uint8_t> bytes = p->BytesAsVector();
if (!FuzzParam(&bytes, fuzzer))
return false;
net::IPAddress ip_address(bytes);
« net/interfaces/ip_address_struct_traits.h ('K') | « remoting/host/ipc_host_event_logger.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698