summaryrefslogtreecommitdiff
path: root/util/libreboot-utils/lib/mkhtemp.c
diff options
context:
space:
mode:
authorLeah Rowe <leah@libreboot.org>2026-03-25 04:58:23 +0000
committerLeah Rowe <leah@libreboot.org>2026-03-25 04:58:23 +0000
commit5f93b7faec18a3eddcb3af3302bf0efa268de221 (patch)
tree2b05b63f8409311317627364796f772af77fb403 /util/libreboot-utils/lib/mkhtemp.c
parent7efdc40cab3118bcf005cce0293d80d08cce6d0c (diff)
lib/mkhtemp: fix bad string comparison
Signed-off-by: Leah Rowe <leah@libreboot.org>
Diffstat (limited to 'util/libreboot-utils/lib/mkhtemp.c')
-rw-r--r--util/libreboot-utils/lib/mkhtemp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/util/libreboot-utils/lib/mkhtemp.c b/util/libreboot-utils/lib/mkhtemp.c
index 3d9a9f6e..2fb2f01a 100644
--- a/util/libreboot-utils/lib/mkhtemp.c
+++ b/util/libreboot-utils/lib/mkhtemp.c
@@ -603,7 +603,7 @@ mkhtemp(int *fd,
if_err_sys(slen(template, max_len, &len) < 0) ||
if_err(len >= max_len, EMSGSIZE)
||
- if_err_sys(slen(fname, max_len, &fname_len)) ||
+ if_err_sys(slen(fname, max_len, &fname_len) < 0) ||
if_err(fname == NULL, EINVAL) ||
if_err(strrchr(fname, '/') != NULL, EINVAL))
return -1;