summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeah Rowe <leah@libreboot.org>2026-03-16 22:05:00 +0000
committerLeah Rowe <leah@libreboot.org>2026-03-16 22:05:42 +0000
commitdb4df525761a4591f45f1f17e1f9ac6512176e9b (patch)
treeff77a16c68851a905e67f3a0c1f01e39ad57a364
parent4f581950c28eeeac38c387e891f36a5bcf2f438f (diff)
util/nvmutil: don't use strcpy
Signed-off-by: Leah Rowe <leah@libreboot.org>
-rw-r--r--util/nvmutil/nvmutil.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/util/nvmutil/nvmutil.c b/util/nvmutil/nvmutil.c
index c7093501..3a5fa567 100644
--- a/util/nvmutil/nvmutil.c
+++ b/util/nvmutil/nvmutil.c
@@ -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