aboutsummaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorMarc-André Lureau <marcandre.lureau@redhat.com>2019-07-12 20:51:54 +0400
committerPaolo Bonzini <pbonzini@redhat.com>2019-07-15 11:20:42 +0200
commit60ae0b91fe78862a6cedc03966929258fa7a39e1 (patch)
tree51c3113e3b096506bc0f264b83fe11c1b11853e1 /contrib
parentc2e8a52ca21473afbca4c98a362a299f5dbf13c8 (diff)
downloadqemu-60ae0b91fe78862a6cedc03966929258fa7a39e1.zip
qemu-60ae0b91fe78862a6cedc03966929258fa7a39e1.tar.gz
qemu-60ae0b91fe78862a6cedc03966929258fa7a39e1.tar.bz2
rdmacm-mux: fix strcpy string warning
../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.lureau@redhat.com> Message-Id: <20190712165154.11504-1-marcandre.lureau@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'contrib')
-rw-r--r--contrib/rdmacm-mux/main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/contrib/rdmacm-mux/main.c b/contrib/rdmacm-mux/main.c
index 30c7052..de53048 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);
break;
case 'p':