]> granicus.if.org Git - pdns/commitdiff
Fix vector usage in AXFRRetriever
authorAki Tuomi <cmouse@desteem.org>
Tue, 29 Sep 2015 15:53:08 +0000 (18:53 +0300)
committerAki Tuomi <cmouse@desteem.org>
Sat, 3 Oct 2015 21:51:47 +0000 (00:51 +0300)
fix cid#1311857

pdns/resolver.cc

index e0d2b65e229c9a23ef6b722a9937290d2ce410f4..df8ea6ba6c52e7d723dd8c22566aaca167e4682e 100644 (file)
@@ -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<char*>(&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);