./pdns/ednssubnet.hh
./pdns/fstrm_logger.cc
./pdns/fstrm_logger.hh
-./pdns/fuzz_dnsdistcache.cc
-./pdns/fuzz_moadnsparser.cc
-./pdns/fuzz_packetcache.cc
-./pdns/fuzz_proxyprotocol.cc
-./pdns/fuzz_zoneparsertng.cc
./pdns/gettime.cc
./pdns/gettime.hh
./pdns/histog.hh
extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size);
-extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
+extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size)
+{
if (size > std::numeric_limits<uint16_t>::max()) {
return 0;
uint16_t qtype;
uint16_t qclass;
unsigned int consumed;
- PacketBuffer vect(data, data+size);
+ PacketBuffer vect(data, data + size);
const DNSName qname(reinterpret_cast<const char*>(data), size, sizeof(dnsheader), false, &qtype, &qclass, &consumed);
pcSkipCookies.getKey(qname.getStorage(), consumed, vect, false);
pcHashCookies.getKey(qname.getStorage(), consumed, vect, false);
boost::optional<Netmask> subnet;
DNSDistPacketCache::getClientSubnet(vect, consumed, subnet);
}
- catch(const std::exception& e) {
+ catch (const std::exception& e) {
}
- catch(const PDNSException& e) {
+ catch (const PDNSException& e) {
}
return 0;
extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size);
-extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
+extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size)
+{
static bool initialized = false;
if (!initialized) {
try {
MOADNSParser moaQuery(true, reinterpret_cast<const char*>(data), size);
}
- catch(const std::exception& e) {
+ catch (const std::exception& e) {
}
- catch(const PDNSException& e) {
+ catch (const PDNSException& e) {
}
try {
MOADNSParser moaAnswer(false, reinterpret_cast<const char*>(data), size);
}
- catch(const std::exception& e) {
+ catch (const std::exception& e) {
}
- catch(const PDNSException& e) {
+ catch (const PDNSException& e) {
}
return 0;
extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size);
-extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
+extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size)
+{
if (size > std::numeric_limits<uint16_t>::max() || size < sizeof(dnsheader)) {
return 0;
/* auth's version */
try {
- static const std::unordered_set<uint16_t> optionsToIgnore{ EDNSOptionCode::COOKIE };
+ static const std::unordered_set<uint16_t> optionsToIgnore{EDNSOptionCode::COOKIE};
PacketCache::canHashPacket(input, optionsToIgnore);
DNSName qname(input.data(), input.size(), sizeof(dnsheader), false);
PacketCache::queryMatches(input, input, qname, optionsToIgnore);
}
- catch(const std::exception& e) {
+ catch (const std::exception& e) {
}
- catch(const PDNSException& e) {
+ catch (const PDNSException& e) {
}
/* recursor's version */
try {
- static const std::unordered_set<uint16_t> optionsToIgnore{ EDNSOptionCode::COOKIE, EDNSOptionCode::ECS };
+ static const std::unordered_set<uint16_t> optionsToIgnore{EDNSOptionCode::COOKIE, EDNSOptionCode::ECS};
PacketCache::canHashPacket(input, optionsToIgnore);
DNSName qname(input.data(), input.size(), sizeof(dnsheader), false);
PacketCache::queryMatches(input, input, qname, optionsToIgnore);
}
- catch(const std::exception& e) {
+ catch (const std::exception& e) {
}
- catch(const PDNSException& e) {
+ catch (const PDNSException& e) {
}
return 0;
extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size);
-extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
+extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size)
+{
std::vector<ProxyProtocolValue> values;
ComboAddress source;
ComboAddress destination;
bool proxy = false;
- bool tcp = false;
+ bool tcp = false;
try {
parseProxyHeader(std::string(reinterpret_cast<const char*>(data), size), proxy, source, destination, tcp, values);
}
- catch(const std::exception& e) {
+ catch (const std::exception& e) {
}
- catch(const PDNSException& e) {
+ catch (const PDNSException& e) {
}
return 0;
extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size);
-extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
+extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size)
+{
static bool initialized = false;
if (!initialized) {
while (zpt.get(drr)) {
}
}
- catch(const std::exception& e) {
+ catch (const std::exception& e) {
}
- catch(const PDNSException& e) {
+ catch (const PDNSException& e) {
}
return 0;