std::strncpy back to strlcpy

This commit is contained in:
d1str4ught
2025-08-22 17:45:31 +02:00
parent 5c9ae80bcd
commit 920a3fc861
59 changed files with 309 additions and 309 deletions

View File

@@ -52,7 +52,7 @@ bool CPeerBase::Accept(socket_t fd_accept)
socket_sndbuf(m_fd, 233016);
socket_rcvbuf(m_fd, 233016);
std::strncpy(m_host, inet_ntoa(peer.sin_addr), sizeof(m_host));
strlcpy(m_host, inet_ntoa(peer.sin_addr), sizeof(m_host));
m_outBuffer = buffer_new(DEFAULT_PACKET_BUFFER_SIZE);
m_inBuffer = buffer_new(MAX_INPUT_LEN);
@@ -71,7 +71,7 @@ bool CPeerBase::Accept(socket_t fd_accept)
bool CPeerBase::Connect(const char* host, WORD port)
{
std::strncpy(m_host, host, sizeof(m_host));
strlcpy(m_host, host, sizeof(m_host));
if ((m_fd = socket_connect(host, port)) == INVALID_SOCKET)
return false;