aboutsummaryrefslogtreecommitdiff
path: root/sway/commands
diff options
context:
space:
mode:
authorDominique Martinet <asmadeus@codewreck.org>2018-04-13 22:35:23 +0900
committerDominique Martinet <asmadeus@codewreck.org>2018-04-13 22:47:27 +0900
commit25af959fe96441123f8ab492427a9390af384918 (patch)
treeeac72167f123b908e1a3fc2120493d2b70fe3984 /sway/commands
parent54ae394754533295627eacb8b26a579bc051dda9 (diff)
downloadsway-25af959fe96441123f8ab492427a9390af384918.tar.xz
Fix gcc string truncation warnings
Diffstat (limited to 'sway/commands')
-rw-r--r--sway/commands/exec_always.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sway/commands/exec_always.c b/sway/commands/exec_always.c
index 954950e7..af4e4965 100644
--- a/sway/commands/exec_always.c
+++ b/sway/commands/exec_always.c
@@ -32,7 +32,7 @@ struct cmd_results *cmd_exec_always(int argc, char **argv) {
// Put argument into cmd array
char cmd[4096];
- strncpy(cmd, tmp, sizeof(cmd));
+ strncpy(cmd, tmp, sizeof(cmd) - 1);
cmd[sizeof(cmd) - 1] = 0;
free(tmp);
wlr_log(L_DEBUG, "Executing %s", cmd);