From ac7892371ce1ef7a05619492f0896f525b4dbdc3 Mon Sep 17 00:00:00 2001 From: Muhamed Hobi Date: Mon, 7 Feb 2022 19:03:54 -0500 Subject: Fix snprintf compiler warning --- sway/commands/output/background.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sway/commands') 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); } -- cgit v1.2.3