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.
This commit is contained in:
parent
a44476ce65
commit
ed90ed62cd
1 changed files with 2 additions and 2 deletions
|
@ -42,8 +42,8 @@ int main(int argc, char *argv[]) {
|
||||||
}
|
}
|
||||||
char **command = &argv[optind];
|
char **command = &argv[optind];
|
||||||
|
|
||||||
char sockpath[256];
|
char sockpath[32];
|
||||||
sprintf(sockpath, "/tmp/seatd.%d.sock", getpid());
|
snprintf(sockpath, sizeof sockpath, "/tmp/seatd.%d.sock", getpid());
|
||||||
|
|
||||||
int fds[2];
|
int fds[2];
|
||||||
if (pipe(fds) == -1) {
|
if (pipe(fds) == -1) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue