From 024862a1523c7c8ed6d812b1dc4ed4ecd23d413f Mon Sep 17 00:00:00 2001 From: Leah Rowe Date: Mon, 23 Mar 2026 08:30:19 +0000 Subject: mkhtemp: fix bad check where the path is quite short and the number of X is quite big compared to the rest of it, this check will actually cause a false overflow error. the maths are correct, just not the error Signed-off-by: Leah Rowe --- util/nvmutil/lib/file.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/util/nvmutil/lib/file.c b/util/nvmutil/lib/file.c index e8dfd865..30694623 100644 --- a/util/nvmutil/lib/file.c +++ b/util/nvmutil/lib/file.c @@ -842,8 +842,7 @@ mkhtemp(int *fd, return -1; } - if (fname_len > len || - fname_len > (len - xc)) { + if (fname_len > len) { errno = EOVERFLOW; return -1; } -- cgit v1.2.1