X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fplugins%2Fhttp_static%2Fhttp_static_test.c;h=3503a1b0812899cc4f110d8a5a70c66d27ae45aa;hb=2dbee9361e74d03727a8b618ba80a5e28c006011;hp=0b46d23dce5aa2180330789628e213db2f984e3a;hpb=b101058890d66c960713fc7c203094fb54643755;p=vpp.git diff --git a/src/plugins/http_static/http_static_test.c b/src/plugins/http_static/http_static_test.c index 0b46d23dce5..3503a1b0812 100644 --- a/src/plugins/http_static/http_static_test.c +++ b/src/plugins/http_static/http_static_test.c @@ -111,11 +111,8 @@ api_http_static_enable (vat_main_t * vam) /* Construct the API message */ M (HTTP_STATIC_ENABLE, mp); - vl_api_to_api_string (strnlen ((const char *) www_root, 256), - (const char *) www_root, - (vl_api_string_t *) & mp->www_root); - vl_api_to_api_string (strnlen ((const char *) uri, 256), (const char *) uri, - (vl_api_string_t *) & mp->uri); + strncpy_s ((char *) mp->www_root, 256, (const char *) www_root, 256); + strncpy_s ((char *) mp->uri, 256, (const char *) uri, 256); mp->fifo_size = ntohl (fifo_size); mp->cache_size_limit = ntohl (cache_size_limit); mp->prealloc_fifos = ntohl (prealloc_fifos);