diff options
author | QC <qball@gmpclient.org> | 2015-05-15 15:44:43 +0200 |
---|---|---|
committer | QC <qball@gmpclient.org> | 2015-05-15 15:44:43 +0200 |
commit | 571aca98341bd36bcf1045eef1d6bac7f3469600 (patch) | |
tree | ccb79b1ec1e3a0d3ae1dd612b17320b118807b3e /source/i3-support.c | |
parent | 14c50132c893e531ec56697901fc59792a1dd801 (diff) |
Fix: #163
Diffstat (limited to 'source/i3-support.c')
-rw-r--r-- | source/i3-support.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/i3-support.c b/source/i3-support.c index 0d7a7661..fc2c9bbe 100644 --- a/source/i3-support.c +++ b/source/i3-support.c @@ -50,7 +50,7 @@ char *i3_socket_path = NULL; void i3_support_focus_window ( Window id ) { i3_ipc_header_t head; - char command[128]; + char command[UNIX_PATH_MAX + 1]; int s, len; ssize_t t; struct sockaddr_un remote; @@ -66,7 +66,7 @@ void i3_support_focus_window ( Window id ) } remote.sun_family = AF_UNIX; - g_strlcpy ( remote.sun_path, i3_socket_path, strlen ( i3_socket_path ) ); + g_strlcpy ( remote.sun_path, i3_socket_path, strlen ( i3_socket_path ) + 1 ); len = strlen ( remote.sun_path ) + sizeof ( remote.sun_family ); if ( connect ( s, ( struct sockaddr * ) &remote, len ) == -1 ) { |