summaryrefslogtreecommitdiff
path: root/util/nvmutil/nvmutil.c
diff options
context:
space:
mode:
authorLeah Rowe <leah@libreboot.org>2026-03-18 05:08:54 +0000
committerLeah Rowe <leah@libreboot.org>2026-03-26 06:59:42 +0000
commit321b0ac07c4d0b6741a633dee18a55145b933f08 (patch)
treede58aae2adb6bee5f965156d9c40217d255cbecd /util/nvmutil/nvmutil.c
parent3256c3fcb8c260283132969f93f36621e1f894f7 (diff)
util/nvmutil: use strlen for tmpdir length
sizeof includes the null Signed-off-by: Leah Rowe <leah@libreboot.org>
Diffstat (limited to 'util/nvmutil/nvmutil.c')
-rw-r--r--util/nvmutil/nvmutil.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/util/nvmutil/nvmutil.c b/util/nvmutil/nvmutil.c
index 8205a1df..3e2e93e3 100644
--- a/util/nvmutil/nvmutil.c
+++ b/util/nvmutil/nvmutil.c
@@ -2770,7 +2770,7 @@ new_tmpfile(int *fd, int local, const char *path)
/*
* appended to filename for tmp:
*/
- tmpdir_len = sizeof(default_tmpname);
+ tmpdir_len = xstrxlen(default_tmpname, maxlen);
} else {
base = x_c_tmpdir();