]> git.ipfire.org Git - thirdparty/pdns.git/commit
Add a minimum offset parameter to DNSName 3766/head
authorRemi Gacogne <remi.gacogne@powerdns.com>
Tue, 26 Apr 2016 09:09:05 +0000 (11:09 +0200)
committerRemi Gacogne <remi.gacogne@powerdns.com>
Tue, 26 Apr 2016 12:03:49 +0000 (14:03 +0200)
commit83fc9d8a9e8f04ed0bb082961b87a2c1494390f1
tree974b5527d78feafa7dc8afc68d69bc0ecec4bf40
parentfb2e6a11b24ff328c65e0a1379942161c8e3d570
Add a minimum offset parameter to DNSName

PacketReader does not copy the header part of the DNS message,
therefore DNSName needs to be aware of the minimum valid offset
in order not to follow a pointer to an offset < sizeof(dnsheader),
as other callers expect every non-negative offset to be valid.
Found with American Fuzzy Lop and Address Sanitizer.
pdns/dnsname.cc
pdns/dnsname.hh
pdns/dnsparser.cc