From 6278e21405c40df65f8de6a9799576d1eb346164 Mon Sep 17 00:00:00 2001 From: Laurent Bercot Date: Wed, 15 Mar 2017 13:56:09 +0000 Subject: Fix memcpy size in s6-tcpserver6d --- src/conn-tools/s6-tcpserver6d.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/conn-tools/s6-tcpserver6d.c b/src/conn-tools/s6-tcpserver6d.c index ec45322..85128e8 100644 --- a/src/conn-tools/s6-tcpserver6d.c +++ b/src/conn-tools/s6-tcpserver6d.c @@ -229,7 +229,7 @@ static void run_child (int s, char const *ip, uint16_t port, unsigned int num, c PROG = "s6-tcpserver6 (child)" ; if ((fd_move(0, s) < 0) || (fd_copy(1, 0) < 0)) strerr_diefu1sys(111, "move fds") ; - memcpy(fmt+n, "PROTO=TCP\0TCPREMOTEIP=", 24) ; n += 22 ; + memcpy(fmt+n, "PROTO=TCP\0TCPREMOTEIP=", 22) ; n += 22 ; n += ip6_fmt(fmt+n, ip) ; fmt[n++] = 0 ; memcpy(fmt+n, "TCPREMOTEPORT=", 14) ; n += 14 ; n += uint16_fmt(fmt+n, port) ; fmt[n++] = 0 ; -- cgit v1.2.3