From ee88ec7c4efce90527d4e77d50a872fa6a1382f5 Mon Sep 17 00:00:00 2001 From: Luc Provoost Date: Wed, 9 Jun 2021 13:51:31 +0200 Subject: Fixing eal parameter issue when more than 64 bytes Using prox_strncpy to copy eal parameters, so PROX will abort in case the parameter exceeds the maximum string length. Also increased the string length from 64 to 256 bytes. Change-Id: Id7cee03f6b625e165342129e9c2c71216d1144e6 Signed-off-by: Luc Provoost --- VNFs/DPPD-PROX/prox_args.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'VNFs/DPPD-PROX') diff --git a/VNFs/DPPD-PROX/prox_args.c b/VNFs/DPPD-PROX/prox_args.c index 178126f6..9b76a43c 100644 --- a/VNFs/DPPD-PROX/prox_args.c +++ b/VNFs/DPPD-PROX/prox_args.c @@ -41,7 +41,7 @@ #include "ip_subnet.h" #define MAX_RTE_ARGV 64 -#define MAX_ARG_LEN 64 +#define MAX_ARG_LEN 256 struct cfg_depr { const char *opt; @@ -2295,7 +2295,7 @@ int prox_setup_rte(const char *prog_name) if (ptr) { *ptr++ = '\0'; } - strcpy(rte_arg[++argc], ptr2); + prox_strncpy(rte_arg[++argc], ptr2, MAX_ARG_LEN); rte_argv[argc] = rte_arg[argc]; } } -- cgit 1.2.3-korg