diff options
Diffstat (limited to 'tmux.c')
-rw-r--r-- | tmux.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -361,7 +361,11 @@ main(int argc, char **argv) } } free(label); - strlcpy(socket_path, path, sizeof socket_path); + + if (strlcpy(socket_path, path, sizeof socket_path) >= sizeof socket_path) { + fprintf(stderr, "socket path too long: %s\n", path); + exit(1); + } free(path); /* Set process title. */ |