fftools/cmdutils: use strcpy directly, the length is computed already

There is no need to scan for NULL, if we inject it ourselves.

Fixes: warning: 'strncat' specified bound 10 equals source length [-Wstringop-overflow=]
Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
This commit is contained in:
Kacper Michajłow
2025-12-01 21:21:25 +01:00
parent f7b7972f78
commit 3cc10b5ff6

View File

@@ -962,8 +962,7 @@ FILE *get_preset_file(char *filename, size_t filename_size,
datadir, desired_size, sizeof *datadir);
if (new_datadir) {
datadir = new_datadir;
datadir[datadir_len] = 0;
strncat(datadir, "/ffpresets", desired_size - 1 - datadir_len);
strcpy(datadir + datadir_len, "/ffpresets");
base[2] = datadir;
}
}