aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/hs_apps/vcl/sock_test_server.c
diff options
context:
space:
mode:
authorDave Barach <dave@barachs.net>2019-07-03 15:21:50 -0400
committerFlorin Coras <florin.coras@gmail.com>2019-07-03 20:24:00 +0000
commit4bda2d955db6d61348f5da94acb72f0447a91f04 (patch)
tree17e906dab5708e121107c234a42ffb94d69ebd40 /src/plugins/hs_apps/vcl/sock_test_server.c
parentfc4828cdbed3f8d6cef8d02239f8603d789ac099 (diff)
misc: fix coverity warnings
Type: fix Ticket: VPP-1649 Change-Id: I93a393eca80065c379035478500e75e855f39b12 Signed-off-by: Dave Barach <dave@barachs.net>
Diffstat (limited to 'src/plugins/hs_apps/vcl/sock_test_server.c')
-rw-r--r--src/plugins/hs_apps/vcl/sock_test_server.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/plugins/hs_apps/vcl/sock_test_server.c b/src/plugins/hs_apps/vcl/sock_test_server.c
index 0714ccce01e..110ff3e183b 100644
--- a/src/plugins/hs_apps/vcl/sock_test_server.c
+++ b/src/plugins/hs_apps/vcl/sock_test_server.c
@@ -343,7 +343,8 @@ af_unix_echo (void)
af_unix_client_fd, nbytes, errno_val);
goto done;
}
-
+ /* Make the buffer is NULL-terminated. */
+ buffer[sizeof (buffer) - 1] = 0;
printf ("SERVER (AF_UNIX): RX (%d bytes) - '%s'\n", rv, buffer);
if (!strncmp (SOCK_TEST_MIXED_EPOLL_DATA, (const char *) buffer, nbytes))