]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
remotebackend: Do not send extra NUL with zeromq
authorAki Tuomi <cmouse@cmouse.fi>
Wed, 20 Mar 2024 21:36:51 +0000 (23:36 +0200)
committerAki Tuomi <cmouse@cmouse.fi>
Thu, 4 Apr 2024 07:51:31 +0000 (10:51 +0300)
modules/remotebackend/zmqconnector.cc

index cce0f3a5ea41ee3a621c0f78747443251db65869..74abc82591776ac3a939e7173a5f08dbeb65f5d8 100644 (file)
@@ -72,9 +72,8 @@ int ZeroMQConnector::send_message(const Json& input)
   auto line = input.dump();
   zmq_msg_t message;
 
-  zmq_msg_init_size(&message, line.size() + 1);
+  zmq_msg_init_size(&message, line.size());
   line.copy(reinterpret_cast<char*>(zmq_msg_data(&message)), line.size());
-  ((char*)zmq_msg_data(&message))[line.size()] = '\0';
 
   try {
     zmq_pollitem_t item;