From eb4f953396667c273b71781b0519a11a82877227 Mon Sep 17 00:00:00 2001 From: Glenn Strauss Date: Sun, 2 Aug 2020 12:49:36 -0400 Subject: [PATCH] [build] avoid accept_filter_arg compiler warning avoid compiler warning for struct accept_filter_arg af_name strncpy() --- src/network.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/network.c b/src/network.c index 6a518aeb..a1e41489 100644 --- a/src/network.c +++ b/src/network.c @@ -401,7 +401,7 @@ static int network_server_init(server *srv, network_socket_config *s, buffer *ho /* FreeBSD accf_http filter */ struct accept_filter_arg afa; memset(&afa, 0, sizeof(afa)); - strncpy(afa.af_name, s->bsd_accept_filter->ptr, sizeof(afa.af_name)); + strncpy(afa.af_name, s->bsd_accept_filter->ptr, sizeof(afa.af_name)-1); if (setsockopt(srv_socket->fd, SOL_SOCKET, SO_ACCEPTFILTER, &afa, sizeof(afa)) < 0) { if (errno != ENOENT) { log_perror(srv->errh, __FILE__, __LINE__,