]> git.ipfire.org Git - thirdparty/pdns.git/commit
dnsdist: Check that cached responses are >= sizeof(dnsheader) 4812/head
authorRemi Gacogne <remi.gacogne@powerdns.com>
Thu, 29 Dec 2016 10:46:36 +0000 (11:46 +0100)
committerRemi Gacogne <remi.gacogne@powerdns.com>
Thu, 29 Dec 2016 10:56:25 +0000 (11:56 +0100)
commit39a219755c5fb174acbe3bee0d1b286e9b1e703f
treec20e4262685a82888d6d4c15bde80e7c6dc9265e
parent2714396eed4a84d5e73e2769d5c00e34116241a8
dnsdist: Check that cached responses are >= sizeof(dnsheader)

The check is done before inserting the response into the cache, but
it feels safer to check it again before passing it to `memcpy()`.
We check that the cached response is larger than
`sizeof(dnsheader) + qname` afterwards, but the previous commit
moved the header copy before that check.
pdns/dnsdist-cache.cc