]> git.ipfire.org Git - thirdparty/pdns.git/commit
Check the record size before allocating in PacketReader::copyRecord() 12480/head
authorRemi Gacogne <remi.gacogne@powerdns.com>
Thu, 26 Jan 2023 14:07:02 +0000 (15:07 +0100)
committerRemi Gacogne <remi.gacogne@powerdns.com>
Thu, 26 Jan 2023 14:07:02 +0000 (15:07 +0100)
commit59a6ce3b0ed3bba5f95e2fb1a5060eecdeff8a66
tree44e8769780ae145aaf1c0d95163ae22ca8a62c9d
parentced7e016cc03cd4ba7cdd08f87532398d1ed7881
Check the record size before allocating in PacketReader::copyRecord()

Technically that does not matter because the size is limited to
2^16-1 bytes, and if the size is incorrect we will throw during the
copy, but it's nicer to detect the incorrect size before allocating,
as suggested by Coverity (CID 383044).
pdns/dnsparser.cc