diff options
author | Laurent Bercot <ska-skaware@skarnet.org> | 2017-03-15 13:56:09 +0000 |
---|---|---|
committer | Laurent Bercot <ska-skaware@skarnet.org> | 2017-03-15 13:56:09 +0000 |
commit | 6278e21405c40df65f8de6a9799576d1eb346164 (patch) | |
tree | 03e2f949472401c7eed3c9fd264905eaf009cdbd /src/conn-tools | |
parent | 6126e9c49f01b315c82cae340caaa1d8f588c0e7 (diff) | |
download | s6-networking-6278e21405c40df65f8de6a9799576d1eb346164.tar.xz |
Fix memcpy size in s6-tcpserver6d
Diffstat (limited to 'src/conn-tools')
-rw-r--r-- | src/conn-tools/s6-tcpserver6d.c | 2 |
1 files changed, 1 insertions, 1 deletions
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 ; |