| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include <iostream> | 5 #include <iostream> |
| 6 #include <set> | 6 #include <set> |
| 7 #include <string> | 7 #include <string> |
| 8 #include <utility> | 8 #include <utility> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 1438 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1449 return false; | 1449 return false; |
| 1450 p->set_host(host); | 1450 p->set_host(host); |
| 1451 p->set_port(port); | 1451 p->set_port(port); |
| 1452 return true; | 1452 return true; |
| 1453 } | 1453 } |
| 1454 }; | 1454 }; |
| 1455 | 1455 |
| 1456 template <> | 1456 template <> |
| 1457 struct FuzzTraits<net::IPEndPoint> { | 1457 struct FuzzTraits<net::IPEndPoint> { |
| 1458 static bool Fuzz(net::IPEndPoint* p, Fuzzer* fuzzer) { | 1458 static bool Fuzz(net::IPEndPoint* p, Fuzzer* fuzzer) { |
| 1459 net::IPAddressNumber address = p->address(); | 1459 net::IPAddressNumber address_number = p->address().bytes(); |
| 1460 int port = p->port(); | 1460 int port = p->port(); |
| 1461 if (!FuzzParam(&address, fuzzer)) | 1461 if (!FuzzParam(&address_number, fuzzer)) |
| 1462 return false; | 1462 return false; |
| 1463 if (!FuzzParam(&port, fuzzer)) | 1463 if (!FuzzParam(&port, fuzzer)) |
| 1464 return false; | 1464 return false; |
| 1465 net::IPEndPoint ip_endpoint(address, port); | 1465 net::IPEndPoint ip_endpoint(address_number, port); |
| 1466 *p = ip_endpoint; | 1466 *p = ip_endpoint; |
| 1467 return true; | 1467 return true; |
| 1468 } | 1468 } |
| 1469 }; | 1469 }; |
| 1470 | 1470 |
| 1471 template <> | 1471 template <> |
| 1472 struct FuzzTraits<network_hints::LookupRequest> { | 1472 struct FuzzTraits<network_hints::LookupRequest> { |
| 1473 static bool Fuzz(network_hints::LookupRequest* p, Fuzzer* fuzzer) { | 1473 static bool Fuzz(network_hints::LookupRequest* p, Fuzzer* fuzzer) { |
| 1474 if (!FuzzParam(&p->hostname_list, fuzzer)) | 1474 if (!FuzzParam(&p->hostname_list, fuzzer)) |
| 1475 return false; | 1475 return false; |
| (...skipping 653 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2129 #include "tools/ipc_fuzzer/message_lib/all_message_null_macros.h" | 2129 #include "tools/ipc_fuzzer/message_lib/all_message_null_macros.h" |
| 2130 #undef IPC_MESSAGE_DECL | 2130 #undef IPC_MESSAGE_DECL |
| 2131 #define IPC_MESSAGE_DECL(kind, type, name, in, out, ilist, olist) \ | 2131 #define IPC_MESSAGE_DECL(kind, type, name, in, out, ilist, olist) \ |
| 2132 (*map)[static_cast<uint32_t>(name::ID)] = fuzzer_for_##name; | 2132 (*map)[static_cast<uint32_t>(name::ID)] = fuzzer_for_##name; |
| 2133 | 2133 |
| 2134 void PopulateFuzzerFunctionMap(FuzzerFunctionMap* map) { | 2134 void PopulateFuzzerFunctionMap(FuzzerFunctionMap* map) { |
| 2135 #include "tools/ipc_fuzzer/message_lib/all_messages.h" | 2135 #include "tools/ipc_fuzzer/message_lib/all_messages.h" |
| 2136 } | 2136 } |
| 2137 | 2137 |
| 2138 } // namespace ipc_fuzzer | 2138 } // namespace ipc_fuzzer |
| OLD | NEW |