aboutsummaryrefslogtreecommitdiffstats
path: root/lib/librte_cfgfile/rte_cfgfile.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/librte_cfgfile/rte_cfgfile.c')
-rw-r--r--lib/librte_cfgfile/rte_cfgfile.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/librte_cfgfile/rte_cfgfile.c b/lib/librte_cfgfile/rte_cfgfile.c
index 7d8c941e..61426963 100644
--- a/lib/librte_cfgfile/rte_cfgfile.c
+++ b/lib/librte_cfgfile/rte_cfgfile.c
@@ -7,6 +7,7 @@
#include <string.h>
#include <ctype.h>
#include <errno.h>
+#include <rte_string_fns.h>
#include <rte_common.h>
#include "rte_cfgfile.h"
@@ -224,10 +225,11 @@ rte_cfgfile_load_with_params(const char *filename, int flags,
_strip(split[1], strlen(split[1]));
char *end = memchr(split[1], '\\', strlen(split[1]));
+ size_t split_len = strlen(split[1]) + 1;
while (end != NULL) {
if (*(end+1) == params->comment_character) {
*end = '\0';
- strcat(split[1], end+1);
+ strlcat(split[1], end+1, split_len);
} else
end++;
end = memchr(end, '\\', strlen(end));