From: Aki Tuomi Date: Tue, 29 Sep 2015 15:53:08 +0000 (+0300) Subject: Fix vector usage in AXFRRetriever X-Git-Tag: dnsdist-1.0.0-alpha1~248^2~12^2~27 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=72a93ecc95a648e1db31355c4a3d59a0c58d29cf;p=pdns Fix vector usage in AXFRRetriever fix cid#1311857 --- diff --git a/pdns/resolver.cc b/pdns/resolver.cc index e0d2b65e2..df8ea6ba6 100644 --- a/pdns/resolver.cc +++ b/pdns/resolver.cc @@ -405,9 +405,9 @@ AXFRRetriever::AXFRRetriever(const ComboAddress& remote, uint16_t replen=htons(packet.size()); Utility::iovec iov[2]; - iov[0].iov_base=(char*)&replen; + iov[0].iov_base=reinterpret_cast(&replen); iov[0].iov_len=2; - iov[1].iov_base=(char*)&packet[0]; + iov[1].iov_base=packet.data(); iov[1].iov_len=packet.size(); int ret=Utility::writev(d_sock, iov, 2);