From f4cb4cdf2ebf630ccb9d41f5ebabdf75a9a989e8 Mon Sep 17 00:00:00 2001 From: "C. McEnroe" Date: Sat, 1 Aug 2020 00:04:43 -0400 Subject: Use snprintf instead of strlcat --- bounce.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'bounce.c') diff --git a/bounce.c b/bounce.c index bee8aca..fc820a3 100644 --- a/bounce.c +++ b/bounce.c @@ -392,8 +392,8 @@ int main(int argc, char *argv[]) { int error = stat(bindPath, &st); if (error && errno != ENOENT) err(EX_CANTCREAT, "%s", bindPath); if (S_ISDIR(st.st_mode)) { - strlcat(bindPath, "/", sizeof(bindPath)); - strlcat(bindPath, bindHost, sizeof(bindPath)); + size_t len = strlen(bindPath); + snprintf(&bindPath[len], sizeof(bindPath) - len, "/%s", bindHost); } } if (!certPath[0]) { -- cgit 1.4.1