diff options
author | Luc Provoost <luc.provoost@intel.com> | 2021-06-09 13:51:31 +0200 |
---|---|---|
committer | Luc Provoost <luc.provoost@intel.com> | 2021-06-09 13:51:31 +0200 |
commit | ee88ec7c4efce90527d4e77d50a872fa6a1382f5 (patch) | |
tree | d8273ff31620d565842d68820c2a6297853d2148 /VNFs | |
parent | d85020c43d0c65dc3891bd4cc03a159f918c62cc (diff) |
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 <luc.provoost@intel.com>
Diffstat (limited to 'VNFs')
-rw-r--r-- | VNFs/DPPD-PROX/prox_args.c | 4 |
1 files changed, 2 insertions, 2 deletions
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]; } } |