util/nvmutil: use strlen for tmpdir length

sizeof includes the null

Signed-off-by: Leah Rowe <leah@libreboot.org>
This commit is contained in:
Leah Rowe
2026-03-18 05:08:54 +00:00
parent ee5ff03765
commit 3b389d4aec

View File

@@ -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();