summaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
authorLeah Rowe <leah@libreboot.org>2026-03-16 22:05:00 +0000
committerLeah Rowe <leah@libreboot.org>2026-03-26 06:59:42 +0000
commit464fb5c0d861c1a9e55b3a4b357546f0070faad3 (patch)
treec27796d5b417047390e1207bb9e0b2a9ed7a1b97 /util
parentcf8cb4bdcc12af8ad5d4d17ed6782b4c83f1ea38 (diff)
util/nvmutil: don't use strcpy
Signed-off-by: Leah Rowe <leah@libreboot.org>
Diffstat (limited to 'util')
-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