summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeah Rowe <leah@libreboot.org>2026-03-18 05:08:54 +0000
committerLeah Rowe <leah@libreboot.org>2026-03-18 05:08:54 +0000
commit3b389d4aecfec4a8ec1bff964b36fee1c2caad33 (patch)
tree4b11a6db01d1eb11b771508c0ce45f570963ad55
parentee5ff037654168d0829c3219ce7d89ab202af40d (diff)
util/nvmutil: use strlen for tmpdir length
sizeof includes the null Signed-off-by: Leah Rowe <leah@libreboot.org>
-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();