aboutsummaryrefslogtreecommitdiff
path: root/server.c
diff options
context:
space:
mode:
authorOmar Polo <op@omarpolo.com>2024-06-10 08:20:35 +0000
committerOmar Polo <op@omarpolo.com>2024-06-10 08:20:35 +0000
commit62aa1935cc563f864635bb9ee0b1204752168fe6 (patch)
tree15a77b8e704bfe8049a8519c0139155b21513a7c /server.c
parent60c2f58b758643fa16f8858e18888fb3c3386cde (diff)
use snprintf
Diffstat (limited to 'server.c')
-rw-r--r--server.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/server.c b/server.c
index ed78ad6..abd697b 100644
--- a/server.c
+++ b/server.c
@@ -813,8 +813,7 @@ open_dir(struct client *c)
return;
}
- strlcpy(path, c->iri.path, sizeof(path));
- strlcat(path, index, sizeof(path));
+ snprintf(path, sizeof(path), "%s%s", c->iri.path, index);
close(c->pfd);
c->pfd = fd;