summaryrefslogtreecommitdiffstats
path: root/src/plugins/rdma/format.c
diff options
context:
space:
mode:
authorBenoît Ganne <bganne@cisco.com>2019-09-30 16:43:25 +0200
committerDave Barach <openvpp@barachs.net>2019-10-01 11:43:20 +0000
commit7ff07354c3a6969e306f75bf28502a46697abcda (patch)
treeb27eb399e06fdcc636d00f1b767181b1f354d756 /src/plugins/rdma/format.c
parent640edcd9016f2381ea1efeaab78e834068c0e862 (diff)
rdma: fix non-NULL terminated C-string overflow
Type: fix Change-Id: I584777825636347c116bd084e348858bcb1b7d75 Signed-off-by: Benoît Ganne <bganne@cisco.com>
Diffstat (limited to 'src/plugins/rdma/format.c')
-rw-r--r--src/plugins/rdma/format.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/rdma/format.c b/src/plugins/rdma/format.c
index 798b21d565d..7a97339746f 100644
--- a/src/plugins/rdma/format.c
+++ b/src/plugins/rdma/format.c
@@ -30,7 +30,7 @@ format_rdma_device_name (u8 * s, va_list * args)
rdma_device_t *rd = vec_elt_at_index (rm->devices, i);
if (rd->name)
- return format (s, "%s", rd->name);
+ return format (s, "%v", rd->name);
s = format (s, "rdma-%u", rd->dev_instance);
return s;
@@ -59,7 +59,7 @@ format_rdma_device (u8 * s, va_list * args)
rdma_device_t *rd = vec_elt_at_index (rm->devices, i);
u32 indent = format_get_indent (s);
- s = format (s, "netdev: %s\n", rd->linux_ifname);
+ s = format (s, "netdev: %v\n", rd->linux_ifname);
s = format (s, "%Uflags: %U", format_white_space, indent,
format_rdma_device_flags, rd);
if (rd->error)