diff options
author | June McEnroe <june@causal.agency> | 2020-08-01 00:04:43 -0400 |
---|---|---|
committer | June McEnroe <june@causal.agency> | 2020-08-01 00:04:43 -0400 |
commit | f4cb4cdf2ebf630ccb9d41f5ebabdf75a9a989e8 (patch) | |
tree | 88d7204adf656791e35d98efc2e6c341f35dd46a /bounce.c | |
parent | Use snprintf instead of strlcpy (diff) | |
download | pounce-f4cb4cdf2ebf630ccb9d41f5ebabdf75a9a989e8.tar.gz pounce-f4cb4cdf2ebf630ccb9d41f5ebabdf75a9a989e8.zip |
Use snprintf instead of strlcat
Diffstat (limited to '')
-rw-r--r-- | bounce.c | 4 |
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]) { |