From: Donghwa Jeong Date: Thu, 21 Jun 2018 05:36:46 +0000 (+0900) Subject: confile: strncat => strlcat X-Git-Tag: lxc-3.1.0~235^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ebcd5140b3c11cf7a3eab78495d80bcc11511b45;p=thirdparty%2Flxc.git confile: strncat => strlcat Signed-off-by: Donghwa Jeong --- diff --git a/src/lxc/confile.c b/src/lxc/confile.c index 593986510..a07290112 100644 --- a/src/lxc/confile.c +++ b/src/lxc/confile.c @@ -69,6 +69,10 @@ #include "include/strlcpy.h" #endif +#ifndef HAVE_STRLCAT +#include "include/strlcat.h" +#endif + lxc_log_define(lxc_confile, lxc); #define lxc_config_define(name) \ @@ -2061,10 +2065,10 @@ int append_unexp_config_line(const char *line, struct lxc_conf *conf) conf->unexpanded_alloced += 1024; } - strncat(conf->unexpanded_config, line, linelen); + (void)strlcat(conf->unexpanded_config, line, conf->unexpanded_alloced); conf->unexpanded_len += linelen; if (line[linelen - 1] != '\n') { - strncat(conf->unexpanded_config, "\n", 1); + (void)strlcat(conf->unexpanded_config, "\n", conf->unexpanded_alloced); conf->unexpanded_len++; }