On Fri, Jul 12, 2019 at 08:51:54PM +0400, Marc-André Lureau wrote: > ../contrib/rdmacm-mux/main.c: In function ‘parse_args’: > ../contrib/rdmacm-mux/main.c:118:13: error: ‘strncpy’ specified bound 3835 > equals destination size [-Werror=stringop-truncation] > 118 | strncpy(unix_socket_path, optarg, SOCKET_PATH_MAX); > > Signed-off-by: Marc-André Lureau <marcandre.lur...@redhat.com> > --- > contrib/rdmacm-mux/main.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/contrib/rdmacm-mux/main.c b/contrib/rdmacm-mux/main.c > index 30c7052651..de53048f06 100644 > --- a/contrib/rdmacm-mux/main.c > +++ b/contrib/rdmacm-mux/main.c > @@ -115,7 +115,7 @@ static void parse_args(int argc, char *argv[]) > > case 's': > /* This is temporary, final name will build below */ > - strncpy(unix_socket_path, optarg, SOCKET_PATH_MAX); > + strncpy(unix_socket_path, optarg, SOCKET_PATH_MAX - 1);
Oops, Thanks! Reviewed-by: Yuval Shaia <yuval.sh...@oracle.com> > break; > > case 'p': > -- > 2.22.0.428.g6d5b264208 >