Chromium Code Reviews| Index: net/dns/dns_hosts_parse_fuzzer.cc |
| diff --git a/components/webcrypto/rsa_import_key_pkcs8_fuzzer.cc b/net/dns/dns_hosts_parse_fuzzer.cc |
| similarity index 64% |
| copy from components/webcrypto/rsa_import_key_pkcs8_fuzzer.cc |
| copy to net/dns/dns_hosts_parse_fuzzer.cc |
| index 184012299e576afa4f344f2a04c7762e27a78ca3..0f82e8ab51051de82a7a9fd6c3c55c57cd50536a 100644 |
| --- a/components/webcrypto/rsa_import_key_pkcs8_fuzzer.cc |
| +++ b/net/dns/dns_hosts_parse_fuzzer.cc |
| @@ -5,11 +5,14 @@ |
| #include <stddef.h> |
| #include <stdint.h> |
| -#include "components/webcrypto/fuzzer_support.h" |
| +#include <string> |
| + |
| +#include "net/dns/dns_hosts.h" |
| // Entry point for LibFuzzer. |
| extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) { |
| - webcrypto::ImportRsaKeyFromDerFuzzData(data, size, |
| - blink::WebCryptoKeyFormatPkcs8); |
| + std::string input(reinterpret_cast<const char*>(data), size); |
| + net::DnsHosts dns_hosts; |
| + net::ParseHosts(input, &dns_hosts); |
|
mmenke
2016/04/28 16:20:03
I'd suggest calling ParseHostsWithCommaModeForTest
Zhongyi Shi
2016/04/28 17:35:17
Done. Thanks:D
|
| return 0; |
| } |