Unsafe use of strncpy replaced by strlcpy. CID 2214.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40636 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -36,11 +36,8 @@ static char iroha_server_name[CANNA_SERVER_NAME_LEN] = {0, 0};
|
|||||||
int
|
int
|
||||||
RkSetServerName(char *s)
|
RkSetServerName(char *s)
|
||||||
{
|
{
|
||||||
if (s)
|
strlcpy(iroha_server_name, s, CANNA_SERVER_NAME_LEN);
|
||||||
(void)strncpy(iroha_server_name, s, CANNA_SERVER_NAME_LEN);
|
return 0;
|
||||||
else
|
|
||||||
iroha_server_name[0] = '\0';
|
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
char *
|
char *
|
||||||
|
|||||||
Reference in New Issue
Block a user