aboutsummaryrefslogtreecommitdiff
path: root/sway/commands
diff options
context:
space:
mode:
Diffstat (limited to 'sway/commands')
-rw-r--r--sway/commands/output/background.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sway/commands/output/background.c b/sway/commands/output/background.c
index 68ee9fe1..1a3939d4 100644
--- a/sway/commands/output/background.c
+++ b/sway/commands/output/background.c
@@ -112,7 +112,7 @@ struct cmd_results *output_cmd_background(int argc, char **argv) {
"Unable to allocate resources");
}
- sprintf(src, "%s/%s", conf_path, rel_path);
+ snprintf(src, strlen(conf_path) + strlen(src) + 2, "%s/%s", conf_path, rel_path);
free(rel_path);
free(conf);
}