pluto: Replaced some strcpy usages with strncpy.

This commit is contained in:
Tobias Brunner committed 2011-04-19 17:35:57 +02:00
1 parent 81b598ca5f
commit 6e0c82141f
2 files changed
+8 -8

No files matched your search

+2 -2
View File
@@ -673,7 +673,7 @@ size_t format_end(char *buf, size_t buf_len, const struct end *this,
}
else if (subnetisnone(&this->client))
{
strcpy(client, "?");
strncpy(client, "?", sizeof(client));
}
else
{
@@ -685,7 +685,7 @@ size_t format_end(char *buf, size_t buf_len, const struct end *this,
/* we are mode config client, or a server with a pool */
client_sep = "===";
client[0] = '%';
strcpy(client+1, this->pool ? this->pool : "modecfg");
strncpy(client+1, this->pool ?: "modecfg", sizeof(client)-1);
}
/* host */