summaryrefslogtreecommitdiffstats
path: root/src/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/hs_apps/vcl/sock_test_server.c3
-rw-r--r--src/plugins/unittest/test_buffer.c2
2 files changed, 3 insertions, 2 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))
diff --git a/src/plugins/unittest/test_buffer.c b/src/plugins/unittest/test_buffer.c
index e5a5643099c..18938d888bb 100644
--- a/src/plugins/unittest/test_buffer.c
+++ b/src/plugins/unittest/test_buffer.c
@@ -55,7 +55,7 @@ linearize_negative_current_data (vlib_main_t * vm)
b->current_length = 14 + data_size;
}
- vlib_buffer_chain_linearize (vm, vlib_get_buffer (vm, bi[0]));
+ (void) vlib_buffer_chain_linearize (vm, vlib_get_buffer (vm, bi[0]));
return 0;
}