diff options
| author | Leah Rowe <leah@libreboot.org> | 2026-03-16 22:05:00 +0000 |
|---|---|---|
| committer | Leah Rowe <leah@libreboot.org> | 2026-03-16 22:05:42 +0000 |
| commit | db4df525761a4591f45f1f17e1f9ac6512176e9b (patch) | |
| tree | ff77a16c68851a905e67f3a0c1f01e39ad57a364 | |
| parent | 4f581950c28eeeac38c387e891f36a5bcf2f438f (diff) | |
util/nvmutil: don't use strcpy
Signed-off-by: Leah Rowe <leah@libreboot.org>
| -rw-r--r-- | util/nvmutil/nvmutil.c | 9 |
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 |
