syslogdctrl: Fix compiler error and SEGV

Fixes #11574

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
This commit is contained in:
Michael Tremer
2018-01-20 14:51:40 +00:00
parent 07e63f6d2a
commit 1e7b718cd4
2 changed files with 2 additions and 1 deletions

View File

@@ -71,7 +71,7 @@ int main(void)
if (!findkey(kv, "REMOTELOG_PROTOCOL", protocol))
{
/* fall back to UDP if no protocol was given */
protocol = "udp";
strcpy(protocol, "udp");
}
if (strspn(hostname, VALID_FQDN) != strlen(hostname))