diff options
Diffstat (limited to 'sway/commands/exec_always.c')
-rw-r--r-- | sway/commands/exec_always.c | 2 |
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); |