diff options
author | Ole Troan <ot@cisco.com> | 2017-10-10 08:43:35 +0200 |
---|---|---|
committer | Ole Troan <ot@cisco.com> | 2017-10-10 08:44:24 +0200 |
commit | 7504e99a8b4ad1bff9bf64ba16fe00fa708e5b1a (patch) | |
tree | cf8604caf5de4d64c4a9ab70b615ff12cb063820 /src/vlibapi/api_shared.c | |
parent | 755b1403daeddc9518bf1383b89945966404643e (diff) |
API versioning: Fix coverity errors from strncpy()
Change-Id: Ife87f9b00f918ff1bb8c91c6f13ebe53a3555a12
Signed-off-by: Ole Troan <ot@cisco.com>
Diffstat (limited to 'src/vlibapi/api_shared.c')
-rw-r--r-- | src/vlibapi/api_shared.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/vlibapi/api_shared.c b/src/vlibapi/api_shared.c index 831e863393b..1bb50d43def 100644 --- a/src/vlibapi/api_shared.c +++ b/src/vlibapi/api_shared.c @@ -921,7 +921,7 @@ vl_msg_api_add_version (api_main_t * am, const char *string, { api_version_t version = {.major = major,.minor = minor,.patch = patch }; ASSERT (strlen (string) < 64); - strncpy (version.name, string, 64); + strncpy (version.name, string, 64 - 1); vec_add1 (am->api_version_list, version); } |