1
0
mirror of https://github.com/mfontanini/libtins synced 2026-01-27 04:11:35 +01:00

Fixed bug triggered in DNS when parsing some unknown record types.

This commit is contained in:
Matias Fontanini
2013-07-25 10:47:09 -03:00
parent 7063e60af9
commit 2cc0ceb1aa

View File

@@ -449,8 +449,10 @@ void DNS::convert_resources(const ResourcesType &lst, std::list<Resource> &res)
throw std::runtime_error("Malformed IPv6 address");
addr = IPv6Address(ptr).to_string();
}
else
else if(Endian::be_to_host(it->information().type) <= NSEC3PARAM)
compose_name(ptr, sz, addr);
else
addr.assign(ptr, ptr + sz);
}
res.push_back(
Resource(dname, addr, Endian::be_to_host(it->information().type),