diff options
author | Alberto Compagno <acompagn+fdio@cisco.com> | 2019-02-22 16:54:25 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@fd.io> | 2019-02-22 16:54:25 +0000 |
commit | fccece7f012c209f04d9f9be4a10073536091914 (patch) | |
tree | acc160a47ae81e04f1b656c3eb4b012a61fe93a2 /libtransport/src/hicn/transport/core/memif_connector.cc | |
parent | f7b5ee120520802c7009f6925b91c9262fde49a1 (diff) | |
parent | 5c774765616b219ddb293ebf37ba79a806523f11 (diff) |
Merge "[HICN-80] Avoid segfault when deleting memif interface on VPP."
Diffstat (limited to 'libtransport/src/hicn/transport/core/memif_connector.cc')
-rw-r--r-- | libtransport/src/hicn/transport/core/memif_connector.cc | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/libtransport/src/hicn/transport/core/memif_connector.cc b/libtransport/src/hicn/transport/core/memif_connector.cc index 0a2affb8a..a4756d136 100644 --- a/libtransport/src/hicn/transport/core/memif_connector.cc +++ b/libtransport/src/hicn/transport/core/memif_connector.cc @@ -136,8 +136,7 @@ int MemifConnector::createMemif(uint32_t index, uint8_t mode, char *s) { args.buffer_size = MEMIF_BUF_SIZE; args.num_s2m_rings = 1; args.num_m2s_rings = 1; - strncpy((char *)args.interface_name, IF_NAME, strlen(IF_NAME)); - // strncpy((char *) args.instance_name, APP_NAME, strlen(APP_NAME)); + strncpy((char *)args.interface_name, IF_NAME, strlen(IF_NAME) + 1); args.mode = memif_interface_mode_t::MEMIF_INTERFACE_MODE_IP; args.socket_filename = (uint8_t *)socket_filename_.c_str(); |