summaryrefslogtreecommitdiffstats
path: root/src/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/memif/memif_test.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/plugins/memif/memif_test.c b/src/plugins/memif/memif_test.c
index b1d563218d9..510462ef6a8 100644
--- a/src/plugins/memif/memif_test.c
+++ b/src/plugins/memif/memif_test.c
@@ -164,11 +164,10 @@ api_memif_socket_filename_add_del (vat_main_t * vam)
M (MEMIF_SOCKET_FILENAME_ADD_DEL, mp);
- memset (mp, 0, sizeof (*mp));
mp->is_add = is_add;
mp->socket_id = htonl (socket_id);
- memcpy (mp->socket_filename,
- socket_filename, sizeof (mp->socket_filename) - 1);
+ strncpy ((char *) mp->socket_filename,
+ (char *) socket_filename, sizeof (mp->socket_filename) - 1);
vec_free (socket_filename);