null-terminate some formatted string 22/8922/5
authorGabriel Ganne <gabriel.ganne@enea.com>
Thu, 19 Oct 2017 13:10:46 +0000 (15:10 +0200)
committerChris Luke <chris_luke@comcast.com>
Fri, 20 Oct 2017 11:32:31 +0000 (11:32 +0000)
commit3491d7f1d05ee5e05ebf0f6129d54c5ca85e22cf
tree28f7f1a72f41e4304c26986803ffef20a06eceb2
parent470a011511a41dcb893df12b33261030717d1e08
null-terminate some formatted string

Any u8* variable created by format() is NOT null-terminated.
Add the null terminating byte with vec_terminate_c_string().

If that variable is used by (at least) hash_get_mem(), then it needs to
be null-terminated, as it will go through string_key_sum() which makes a
call to strlen.

Change-Id: I4e51e1b6668f557e53af3bb897cd281598eedbc0
Signed-off-by: Gabriel Ganne <gabriel.ganne@enea.com>
src/vnet/lisp-cp/lisp_api.c
src/vnet/lisp-cp/one_api.c
src/vnet/policer/policer_api.c
src/vpp/api/api.c