aboutsummaryrefslogtreecommitdiff
path: root/example/ipsec_crypto
diff options
context:
space:
mode:
authorJere Leppänen <jere.leppanen@nokia.com>2024-02-16 14:29:28 +0200
committerMatias Elo <matias.elo@nokia.com>2024-04-26 15:16:11 +0300
commitbc854b8eab342247da1f927a870f68a3774a10d5 (patch)
treef7e5d8bad3f44728ed7a53c4195dc22b25bc5ea7 /example/ipsec_crypto
parenta107887da3c422c25006cadc9328be550123f5a5 (diff)
test, example: use odph_strcpy() instead of strncpy()
Use odph_strcpy() instead of strncpy(). Signed-off-by: Jere Leppänen <jere.leppanen@nokia.com> Reviewed-by: Matias Elo <matias.elo@nokia.com>
Diffstat (limited to 'example/ipsec_crypto')
-rw-r--r--example/ipsec_crypto/odp_ipsec_fwd_db.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/example/ipsec_crypto/odp_ipsec_fwd_db.c b/example/ipsec_crypto/odp_ipsec_fwd_db.c
index 292d9c7c6..482813d41 100644
--- a/example/ipsec_crypto/odp_ipsec_fwd_db.c
+++ b/example/ipsec_crypto/odp_ipsec_fwd_db.c
@@ -78,8 +78,7 @@ int create_fwd_db_entry(char *input, char **if_names, int if_count)
&entry->subnet.mask);
break;
case 1:
- strncpy(entry->oif, token, OIF_LEN - 1);
- entry->oif[OIF_LEN - 1] = 0;
+ odph_strcpy(entry->oif, token, OIF_LEN);
for (i = 0; i < if_count; i++) {
if (!strcmp(if_names[i], entry->oif)) {
match = 1;