diff options
| author | Furkan Sahin <furkan-dev@proton.me> | 2016-05-02 08:14:01 -0400 |
|---|---|---|
| committer | Furkan Sahin <furkan-dev@proton.me> | 2016-05-02 08:14:01 -0400 |
| commit | 501ed21df2ce8276eb906940e29935496f008302 (patch) | |
| tree | 7977ecbdd47956f5d7c449f8e01c6b41926a34eb | |
| parent | 8f7e53b96e2aef3fec7e37432aaf1e4e13209a9e (diff) | |
| parent | 72156b150724f8d888399a7f4b437a712e91aa39 (diff) | |
Merge pull request #628 from 1ace/fix/ipc-path
Always terminate ipc path
| -rw-r--r-- | sway/ipc-server.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sway/ipc-server.c b/sway/ipc-server.c index 4d9264e8..a9325a81 100644 --- a/sway/ipc-server.c +++ b/sway/ipc-server.c @@ -66,6 +66,7 @@ void ipc_init(void) { // We want to use socket name set by user, not existing socket from another sway instance. if (getenv("SWAYSOCK") != NULL && access(getenv("SWAYSOCK"), F_OK) == -1) { strncpy(ipc_sockaddr->sun_path, getenv("SWAYSOCK"), sizeof(ipc_sockaddr->sun_path)); + ipc_sockaddr->sun_path[sizeof(ipc_sockaddr->sun_path) - 1] = 0; } unlink(ipc_sockaddr->sun_path); |
