From f1d0de85fdf6121bc1c58786a280553349678147 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Mon, 21 Sep 2020 00:27:31 +0200 Subject: [PATCH] Use strcpy_literal for string literals --- configuration.c | 2 +- frontend/frontend_salamander.c | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/configuration.c b/configuration.c index 64de34c478..f0763603f7 100644 --- a/configuration.c +++ b/configuration.c @@ -4692,7 +4692,7 @@ static bool config_file_salamander_get_path(char *s, size_t len) FILE_PATH_SALAMANDER_CONFIG, len); else - strlcpy(s, FILE_PATH_SALAMANDER_CONFIG, len); + strcpy_literal(s, FILE_PATH_SALAMANDER_CONFIG); return !string_is_empty(s); } diff --git a/frontend/frontend_salamander.c b/frontend/frontend_salamander.c index 96f6adf493..ad0f6264d7 100644 --- a/frontend/frontend_salamander.c +++ b/frontend/frontend_salamander.c @@ -133,8 +133,7 @@ static void salamander_init(char *s, size_t len) FILE_PATH_SALAMANDER_CONFIG, sizeof(config_path)); else - strlcpy(config_path, FILE_PATH_SALAMANDER_CONFIG, - sizeof(config_path)); + strcpy_literal(config_path, FILE_PATH_SALAMANDER_CONFIG); /* Attempt to open config file */ config = config_file_new_from_path_to_string(config_path);