aboutsummaryrefslogtreecommitdiff
path: root/lib/libfetch/common.c
diff options
context:
space:
mode:
authorJohn Baldwin <jhb@FreeBSD.org>2022-10-03 23:10:43 +0000
committerJohn Baldwin <jhb@FreeBSD.org>2022-11-11 18:18:54 +0000
commit7cefb4bc4b1cf8c5e61a2dde8c84249712290319 (patch)
tree3fbddcc806ea0fa3db67b96bcc8df3588cb6aee2 /lib/libfetch/common.c
parent1f9f319919d7f8b76c8d8a7edb71ca2f39fb40e1 (diff)
Diffstat (limited to 'lib/libfetch/common.c')
-rw-r--r--lib/libfetch/common.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libfetch/common.c b/lib/libfetch/common.c
index 628ab69612f7..47545e5178c3 100644
--- a/lib/libfetch/common.c
+++ b/lib/libfetch/common.c
@@ -456,7 +456,7 @@ fetch_socks5_init(conn_t *conn, const char *host, int port, int verbose)
goto fail;
}
*ptr++ = strlen(host);
- strncpy(ptr, host, strlen(host));
+ memcpy(ptr, host, strlen(host));
ptr = ptr + strlen(host);
port = htons(port);