summary refs log tree commit diff
path: root/bounce.c
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2020-08-01 00:04:43 -0400
committerJune McEnroe <june@causal.agency>2020-08-01 00:04:43 -0400
commitf4cb4cdf2ebf630ccb9d41f5ebabdf75a9a989e8 (patch)
tree88d7204adf656791e35d98efc2e6c341f35dd46a /bounce.c
parentUse snprintf instead of strlcpy (diff)
downloadpounce-f4cb4cdf2ebf630ccb9d41f5ebabdf75a9a989e8.tar.gz
pounce-f4cb4cdf2ebf630ccb9d41f5ebabdf75a9a989e8.zip
Use snprintf instead of strlcat
Diffstat (limited to '')
-rw-r--r--bounce.c4
1 files changed, 2 insertions, 2 deletions
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]) {