From b97eac8f3006dccd4a4eca6ec1b59cdf41c1db19 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Mon, 29 Aug 2016 04:02:58 +0200 Subject: [PATCH] config_save_autoconf_profile - prevent first two parameters of fill_pathname_join being the same --- configuration.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/configuration.c b/configuration.c index 77a8c0edc1..a79bd178e6 100644 --- a/configuration.c +++ b/configuration.c @@ -2757,9 +2757,11 @@ bool config_save_autoconf_profile(const char *path, unsigned user) if(path_is_directory(buf)) { - fill_pathname_join(buf, buf, - path, sizeof(buf)); - fill_pathname_noext(autoconf_file, buf, + char buf_new[PATH_MAX_LENGTH] = {0}; + + fill_pathname_join(buf_new, buf, + path, sizeof(buf_new)); + fill_pathname_noext(autoconf_file, buf_new, file_path_str(FILE_PATH_CONFIG_EXTENSION), sizeof(autoconf_file)); }