aboutsummaryrefslogtreecommitdiff
path: root/seatd-launch
diff options
context:
space:
mode:
authorKenny Levinsen <kl@kl.wtf>2022-02-21 21:27:14 +0100
committerKenny Levinsen <kl@kl.wtf>2022-02-21 21:27:14 +0100
commited90ed62cdf1c4e7d59e4d279a5bf946b93057dd (patch)
tree90cb831b059a1054077e0d4fa1860f90fb09c1b2 /seatd-launch
parenta44476ce65af5c192860130cb25b0ce17cec2651 (diff)
seatd-launch: Use snprintf for socket path
We also reduce the size of the buffer from 256 bytes to a much more reasonable 32 bytes.
Diffstat (limited to 'seatd-launch')
-rw-r--r--seatd-launch/seatd-launch.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/seatd-launch/seatd-launch.c b/seatd-launch/seatd-launch.c
index 4f15616..8057ba7 100644
--- a/seatd-launch/seatd-launch.c
+++ b/seatd-launch/seatd-launch.c
@@ -42,8 +42,8 @@ int main(int argc, char *argv[]) {
}
char **command = &argv[optind];
- char sockpath[256];
- sprintf(sockpath, "/tmp/seatd.%d.sock", getpid());
+ char sockpath[32];
+ snprintf(sockpath, sizeof sockpath, "/tmp/seatd.%d.sock", getpid());
int fds[2];
if (pipe(fds) == -1) {