From 3b389d4aecfec4a8ec1bff964b36fee1c2caad33 Mon Sep 17 00:00:00 2001 From: Leah Rowe Date: Wed, 18 Mar 2026 05:08:54 +0000 Subject: util/nvmutil: use strlen for tmpdir length sizeof includes the null Signed-off-by: Leah Rowe --- util/nvmutil/nvmutil.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'util') 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(); -- cgit v1.2.1