From db4df525761a4591f45f1f17e1f9ac6512176e9b Mon Sep 17 00:00:00 2001 From: Leah Rowe Date: Mon, 16 Mar 2026 22:05:00 +0000 Subject: util/nvmutil: don't use strcpy Signed-off-by: Leah Rowe --- util/nvmutil/nvmutil.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'util/nvmutil') 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 -- cgit v1.2.1