summaryrefslogtreecommitdiffstats
path: root/VNFs/DPPD-PROX/prox_lua.c
diff options
context:
space:
mode:
authorXavier Simonart <xavier.simonart@intel.com>2019-08-13 10:14:32 -0400
committerPatrice Buriez <patrice.buriez@intel.com>2019-10-08 19:21:34 +0000
commitfb0c44a8e62de7cf06a1ad0c025ac7ecb39cad27 (patch)
tree4eca4ee386a0de23dc1028a37d90ce2c731f1798 /VNFs/DPPD-PROX/prox_lua.c
parentd3552eafaca34771734258f3ff6f4f5f819e72bd (diff)
Support for recent GCC compiler
This is required for instance on gcc (GCC) 8.2.1 20180905 Signed-off-by: Xavier Simonart <xavier.simonart@intel.com> Change-Id: Id86de5d39d77c5cbf168cc51434f436f84376a4c
Diffstat (limited to 'VNFs/DPPD-PROX/prox_lua.c')
-rw-r--r--VNFs/DPPD-PROX/prox_lua.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/VNFs/DPPD-PROX/prox_lua.c b/VNFs/DPPD-PROX/prox_lua.c
index b5c2fec9..4e2f18a6 100644
--- a/VNFs/DPPD-PROX/prox_lua.c
+++ b/VNFs/DPPD-PROX/prox_lua.c
@@ -20,6 +20,7 @@
#include "prox_lua.h"
#include "lua_compat.h"
#include "parse_utils.h"
+#include "prox_compat.h"
static struct lua_State *lua_instance;
@@ -137,7 +138,7 @@ static int l_mac(lua_State *L)
if (lua_isstring(L, -1)) {
const char *arg = lua_tostring(L, -1);
char arg2[128];
- strncpy(arg2, arg, sizeof(arg2));
+ prox_strncpy(arg2, arg, sizeof(arg2));
char *p = arg2;
int count = 0;
@@ -223,7 +224,7 @@ static int l_ip6(lua_State *L)
int next_str = 1;
int ret;
- strncpy(arg2, arg, sizeof(arg2));
+ prox_strncpy(arg2, arg, sizeof(arg2));
for (size_t i = 0; i < str_len; ++i) {
if (next_str) {
@@ -270,7 +271,7 @@ static int l_cidr(lua_State *L)
const char *arg = lua_tostring(L, -1);
char tmp[128];
- strncpy(tmp, arg, sizeof(tmp));
+ prox_strncpy(tmp, arg, sizeof(tmp));
char *slash = strchr(tmp, '/');
*slash = 0;
@@ -296,7 +297,7 @@ static int l_cidr6(lua_State *L)
const char *arg = lua_tostring(L, -1);
char tmp[128];
- strncpy(tmp, arg, sizeof(tmp));
+ prox_strncpy(tmp, arg, sizeof(tmp));
char *slash = strchr(tmp, '/');
*slash = 0;