]> granicus.if.org Git - pdns/commit
Only access cmsg->cmsg_len when cmsg is initialized.
authorFlorian Obser <florian@narrans.de>
Mon, 12 May 2014 09:10:42 +0000 (11:10 +0200)
committerFlorian Obser <florian@narrans.de>
Mon, 12 May 2014 09:10:42 +0000 (11:10 +0200)
commitecc8571fd66405ef4f57656e047cdc417149df26
tree7e98c2a898a32faadb7116bd2d99c92967f9de07
parent10908497c88fe478b77fb3f75b37a0fff8ec22d1
Only access cmsg->cmsg_len when cmsg is initialized.

When neither IP_PKTINFO nor IP_SENDSRCADDR are defined cmsg is not
initialized and leads to random crashes. While there initialize cmsg
to NULL which would have made it easier to find this bug.
pdns/misc.cc