From: Alec Leamas Date: Sun, 30 Dec 2018 21:26:15 +0100 Subject: [PATCH] lircd: Fix --connect option parsing error (#343). Bug: https://sourceforge.net/p/lirc/tickets/343/ --- daemons/lircd.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/daemons/lircd.cpp b/daemons/lircd.cpp index d5be708..ad8dde9 100644 --- a/daemons/lircd.cpp +++ b/daemons/lircd.cpp @@ -790,7 +790,7 @@ int add_peer_connection(const char* server_arg) struct servent* service; char server[strlen(server_arg) + 1]; - strncpy(server, server_arg, sizeof(server) - 1); + strncpy(server, server_arg, sizeof(server)); if (peern < MAX_PEERS) { peers[peern] = (struct peer_connection*) malloc(sizeof(