diff options
author | Mauro Sardara <msardara@cisco.com> | 2019-02-22 12:20:19 +0100 |
---|---|---|
committer | Mauro Sardara <msardara@cisco.com> | 2019-02-22 13:13:40 +0100 |
commit | 5c774765616b219ddb293ebf37ba79a806523f11 (patch) | |
tree | 8b228bf37f947f559f969721225e63e2caa6f73c /libtransport/src/hicn/transport/core/memif_connector.cc | |
parent | 1e2e32c281ddb053d03efd74eea660dfb0b6316f (diff) |
[HICN-80] Avoid segfault when deleting memif interface on VPP.
Change-Id: Ie36cfc0ade82b38815d61a7ead2c72fc640236ed
Signed-off-by: Mauro Sardara <msardara@cisco.com>
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 c69a87fb7..af737412d 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(); |