| Index: net/tools/dns_fuzz_stub/dns_fuzz_stub.cc
|
| diff --git a/net/tools/dns_fuzz_stub/dns_fuzz_stub.cc b/net/tools/dns_fuzz_stub/dns_fuzz_stub.cc
|
| index d77abeee8810f13e0e5c43344be26b64aea8e5e1..e15cdbd1c9ecbbd23d982d9b60981304f775eb78 100644
|
| --- a/net/tools/dns_fuzz_stub/dns_fuzz_stub.cc
|
| +++ b/net/tools/dns_fuzz_stub/dns_fuzz_stub.cc
|
| @@ -26,7 +26,7 @@ namespace {
|
|
|
| void CrashDoubleFree(void) {
|
| // Cause ASAN to detect a double-free
|
| - void *p = malloc(1);
|
| + void* p = malloc(1);
|
| LOG(INFO) << "Allocated p=" << p << ". Double-freeing...";
|
| free(p);
|
| free(p);
|
| @@ -34,7 +34,7 @@ void CrashDoubleFree(void) {
|
|
|
| void CrashNullPointerDereference(void) {
|
| // Cause the program to segfault with a NULL pointer dereference
|
| - int *p = NULL;
|
| + int* p = NULL;
|
| *p = 0;
|
| }
|
|
|
| @@ -47,7 +47,9 @@ bool FitsUint16(int num) {
|
| }
|
|
|
| bool ReadTestCase(const char* filename,
|
| - uint16* id, std::string* qname, uint16* qtype,
|
| + uint16* id,
|
| + std::string* qname,
|
| + uint16* qtype,
|
| std::vector<char>* resp_buf,
|
| bool* crash_test) {
|
| base::FilePath filepath = base::FilePath::FromUTF8Unsafe(filename);
|
| @@ -134,7 +136,9 @@ bool ReadTestCase(const char* filename,
|
| return true;
|
| }
|
|
|
| -void RunTestCase(uint16 id, std::string& qname, uint16 qtype,
|
| +void RunTestCase(uint16 id,
|
| + std::string& qname,
|
| + uint16 qtype,
|
| std::vector<char>& resp_buf) {
|
| net::DnsQuery query(id, qname, qtype);
|
| net::DnsResponse response;
|
| @@ -147,8 +151,8 @@ void RunTestCase(uint16 id, std::string& qname, uint16 qtype,
|
|
|
| net::AddressList address_list;
|
| base::TimeDelta ttl;
|
| - net::DnsResponse::Result result = response.ParseToAddressList(
|
| - &address_list, &ttl);
|
| + net::DnsResponse::Result result =
|
| + response.ParseToAddressList(&address_list, &ttl);
|
| if (result != net::DnsResponse::DNS_PARSE_OK) {
|
| LOG(INFO) << "ParseToAddressList failed: " << result;
|
| return;
|
| @@ -196,7 +200,6 @@ bool ReadAndRunTestCase(const char* filename) {
|
|
|
| return true;
|
| }
|
| -
|
| }
|
|
|
| int main(int argc, char** argv) {
|
| @@ -212,4 +215,3 @@ int main(int argc, char** argv) {
|
|
|
| return ret;
|
| }
|
| -
|
|
|