1
0
Fork 0
mirror of https://gitlab.alpinelinux.org/alpine/aports.git synced 2025-07-24 19:55:26 +03:00
aports/community/lirc/0004-lircd-Fix-connect-option-parsing-error-343.patch
2020-10-17 03:44:02 +00:00

22 lines
726 B
Diff

From: Alec Leamas <leamas.alec@gmail.com>
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(