summaryrefslogtreecommitdiffstats
path: root/src/vnet/session-apps/echo_server.c
diff options
context:
space:
mode:
authorDave Barach <dave@barachs.net>2018-10-17 10:38:51 -0400
committerDamjan Marion <dmarion@me.com>2018-10-23 13:06:46 +0000
commitb7b929931a07fbb27b43d5cd105f366c3e29807e (patch)
tree438681c89738802dbb5d339715b96ea2c31bafb4 /src/vnet/session-apps/echo_server.c
parentb9a4c445c1d4e9cdab476a8e1fb8a46ff0fc6080 (diff)
c11 safe string handling support
Change-Id: Ied34720ca5a6e6e717eea4e86003e854031b6eab Signed-off-by: Dave Barach <dave@barachs.net>
Diffstat (limited to 'src/vnet/session-apps/echo_server.c')
-rw-r--r--src/vnet/session-apps/echo_server.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/vnet/session-apps/echo_server.c b/src/vnet/session-apps/echo_server.c
index 14ab36d796c..3ee33ea8e29 100644
--- a/src/vnet/session-apps/echo_server.c
+++ b/src/vnet/session-apps/echo_server.c
@@ -287,8 +287,8 @@ echo_server_attach (u8 * appns_id, u64 appns_flags, u64 appns_secret)
u64 options[APP_OPTIONS_N_OPTIONS];
u32 segment_size = 512 << 20;
- memset (a, 0, sizeof (*a));
- memset (options, 0, sizeof (options));
+ clib_memset (a, 0, sizeof (*a));
+ clib_memset (options, 0, sizeof (options));
if (esm->no_echo)
echo_server_session_cb_vft.builtin_app_rx_callback =
@@ -327,13 +327,13 @@ echo_server_attach (u8 * appns_id, u64 appns_flags, u64 appns_secret)
}
esm->app_index = a->app_index;
- memset (a_cert, 0, sizeof (*a_cert));
+ clib_memset (a_cert, 0, sizeof (*a_cert));
a_cert->app_index = a->app_index;
vec_validate (a_cert->cert, test_srv_crt_rsa_len);
clib_memcpy (a_cert->cert, test_srv_crt_rsa, test_srv_crt_rsa_len);
vnet_app_add_tls_cert (a_cert);
- memset (a_key, 0, sizeof (*a_key));
+ clib_memset (a_key, 0, sizeof (*a_key));
a_key->app_index = a->app_index;
vec_validate (a_key->key, test_srv_key_rsa_len);
clib_memcpy (a_key->key, test_srv_key_rsa, test_srv_key_rsa_len);
@@ -359,7 +359,7 @@ echo_server_listen ()
{
echo_server_main_t *esm = &echo_server_main;
vnet_bind_args_t _a, *a = &_a;
- memset (a, 0, sizeof (*a));
+ clib_memset (a, 0, sizeof (*a));
a->app_index = esm->app_index;
a->uri = esm->server_uri;
return vnet_bind_uri (a);