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

@@ -156,7 +156,7 @@ LPDESC DESC_MANAGER::AcceptDesc(LPFDWATCH fdw, socket_t s)
if ((desc = socket_accept(s, &peer)) == -1)
return NULL;
std::strncpy(host, inet_ntoa(peer.sin_addr), sizeof(host));
strlcpy(host, inet_ntoa(peer.sin_addr), sizeof(host));
if (g_bAuthServer)
{
@@ -205,7 +205,7 @@ LPDESC DESC_MANAGER::AcceptP2PDesc(LPFDWATCH fdw, socket_t bind_fd)
if ((fd = socket_accept(bind_fd, &peer)) == -1)
return NULL;
std::strncpy(host, inet_ntoa(peer.sin_addr), sizeof(host));
strlcpy(host, inet_ntoa(peer.sin_addr), sizeof(host));
LPDESC_P2P pkDesc = M2_NEW DESC_P2P;