From 7fb0b2f69293f0fb0e83e9b125fbd658503147f0 Mon Sep 17 00:00:00 2001 From: Leah Rowe Date: Sun, 29 Mar 2026 22:15:27 +0100 Subject: libreboot-utils: safe memcmp Signed-off-by: Leah Rowe --- util/libreboot-utils/lib/mkhtemp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'util/libreboot-utils/lib/mkhtemp.c') diff --git a/util/libreboot-utils/lib/mkhtemp.c b/util/libreboot-utils/lib/mkhtemp.c index bba8a7ca..2ef26d67 100644 --- a/util/libreboot-utils/lib/mkhtemp.c +++ b/util/libreboot-utils/lib/mkhtemp.c @@ -567,7 +567,7 @@ mkhtemp(int *fd, if_err(fname_len > template_len, EOVERFLOW)) return -1; - if (if_err(memcmp(fname, template + template_len - fname_len, + if (if_err(vcmp(fname, template + template_len - fname_len, fname_len) != 0, EINVAL)) return -1; -- cgit v1.2.1