lordgamez commented on a change in pull request #1020:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1020#discussion_r585618228



##########
File path: nanofi/include/sitetosite/CPeer.h
##########
@@ -74,8 +74,8 @@ static void setHostName(struct SiteToSiteCPeer * peer, const 
char * hostname) {
   peer->_url = (char*)malloc(host_len + 14);  // +1 for trailing zero, 1 for 
':', at most 5 for port, 7 for "nifi://" suffix
   memset(peer->_url, 0, host_len + 14);  // make sure to have zero padding no 
matter the length of the port
   strncpy(peer->_host, hostname, host_len);
-  strncpy(peer->_url, "nifi://", 7);
-  strncpy(peer->_url + 7, hostname, host_len);
+  memcpy(peer->_url, "nifi://", 7);

Review comment:
       Updated in 828f564566b9e7fa50bfe0f37bcbf0996b22de67




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to