File: 0004-lircd-Fix-connect-option-parsing-error-343.patch

package info (click to toggle)
lirc 0.10.1-6
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 8,364 kB
  • sloc: ansic: 26,717; cpp: 9,066; sh: 5,521; python: 4,362; makefile: 1,034; xml: 63
file content (22 lines) | stat: -rw-r--r-- 726 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
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(