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

@@ -184,11 +184,11 @@ void ShutdownOnFatalError()
{
char buf[256];
std::strncpy(buf, LC_TEXT("서버에 치명적인 오류가 발생하여 자동으로 재부팅됩니다."), sizeof(buf));
strlcpy(buf, LC_TEXT("서버에 치명적인 오류가 발생하여 자동으로 재부팅됩니다."), sizeof(buf));
SendNotice(buf);
std::strncpy(buf, LC_TEXT("10초후 자동으로 접속이 종료되며,"), sizeof(buf));
strlcpy(buf, LC_TEXT("10초후 자동으로 접속이 종료되며,"), sizeof(buf));
SendNotice(buf);
std::strncpy(buf, LC_TEXT("5분 후에 정상적으로 접속하실수 있습니다."), sizeof(buf));
strlcpy(buf, LC_TEXT("5분 후에 정상적으로 접속하실수 있습니다."), sizeof(buf));
SendNotice(buf);
}
@@ -718,7 +718,7 @@ int start(int argc, char **argv)
switch (ch)
{
case 'I': // IP
std::strncpy(g_szPublicIP, argv[optind], sizeof(g_szPublicIP));
strlcpy(g_szPublicIP, argv[optind], sizeof(g_szPublicIP));
printf("IP %s\n", g_szPublicIP);