From c29afcbe8caa4ddff9bc4372810ec79ebe9fe242 Mon Sep 17 00:00:00 2001 From: achazal Date: Tue, 2 Jun 2026 16:41:43 +0200 Subject: [PATCH] Fix -Werror=stringop-truncation build failure in fileutils.c --- client/src/fileutils.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/client/src/fileutils.c b/client/src/fileutils.c index 1101370e6a..52587b5e6d 100644 --- a/client/src/fileutils.c +++ b/client/src/fileutils.c @@ -3036,9 +3036,7 @@ static int filelist(const char *path, const char *ext, uint8_t last, bool tentat for (int i = 0; i < n; i++) { char tmp_fullpath[1024] = {0}; - strncat(tmp_fullpath, path, sizeof(tmp_fullpath) - 1); - tmp_fullpath[1023] = 0x00; - strncat(tmp_fullpath, namelist[i]->d_name, strlen(tmp_fullpath) - 1); + snprintf(tmp_fullpath, sizeof(tmp_fullpath), "%s%s", path, namelist[i]->d_name); if (path_is_directory(tmp_fullpath)) {