util/nvmutil: don't use strcpy

Signed-off-by: Leah Rowe <leah@libreboot.org>
This commit is contained in:
Leah Rowe
2026-03-16 22:05:00 +00:00
parent cf8cb4bdcc
commit 464fb5c0d8
+6 -3
View File
@@ -2164,10 +2164,13 @@ fsync_dir(const char *path)
if (slash != NULL) {
*slash = '\0';
if (*dirbuf == '\0')
strcpy(dirbuf, "/");
if (*dirbuf == '\0') {
dirbuf[0] = '/';
dirbuf[1] = '\0';
}
} else {
strcpy(dirbuf, ".");
dirbuf[0] = '.';
dirbuf[1] = '\0';
}
dfd = open(dirbuf, O_RDONLY