mirror of
https://codeberg.org/libreboot/lbmk.git
synced 2026-07-11 05:52:36 +02:00
util/nvmutil: don't use strcpy
Signed-off-by: Leah Rowe <leah@libreboot.org>
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user