mirror of
https://codeberg.org/libreboot/lbmk.git
synced 2026-07-19 09:32:27 +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) {
|
if (slash != NULL) {
|
||||||
*slash = '\0';
|
*slash = '\0';
|
||||||
if (*dirbuf == '\0')
|
if (*dirbuf == '\0') {
|
||||||
strcpy(dirbuf, "/");
|
dirbuf[0] = '/';
|
||||||
|
dirbuf[1] = '\0';
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
strcpy(dirbuf, ".");
|
dirbuf[0] = '.';
|
||||||
|
dirbuf[1] = '\0';
|
||||||
}
|
}
|
||||||
|
|
||||||
dfd = open(dirbuf, O_RDONLY
|
dfd = open(dirbuf, O_RDONLY
|
||||||
|
|||||||
Reference in New Issue
Block a user