From f2185b393363a61baf4beaac32b6fe13793d5617 Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Mon, 9 Jan 2023 00:48:42 +0100 Subject: [PATCH] use strcat instead of strncat, we are adding same as we removed --- client/src/ui.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/client/src/ui.c b/client/src/ui.c index ff885af37..839dd22b0 100644 --- a/client/src/ui.c +++ b/client/src/ui.c @@ -88,7 +88,6 @@ int searchHomeFilePath(char **foundpath, const char *subdir, const char *filenam strcpy(path, user_path); strcat(path, PM3_USER_DIRECTORY); - int result; #ifdef _WIN32 @@ -97,7 +96,7 @@ int searchHomeFilePath(char **foundpath, const char *subdir, const char *filenam if (str_endswith(path, PATHSEP)) { memset(path + (strlen(path) - strlen(PATHSEP)), 0x00, strlen(PATHSEP)); result = _stat(path, &st); - strncat(path, PATHSEP, strlen(PATHSEP)); + strcat(path, PATHSEP); } else { result = _stat(path, &st); } @@ -131,7 +130,7 @@ int searchHomeFilePath(char **foundpath, const char *subdir, const char *filenam if (str_endswith(path, PATHSEP)) { memset(path + (strlen(path) - strlen(PATHSEP)), 0x00, strlen(PATHSEP)); result = _stat(path, &st); - strncat(path, PATHSEP, strlen(PATHSEP)); + strcat(path, PATHSEP); } else { result = _stat(path, &st); }