libreboot-utils: safe memcmp

Signed-off-by: Leah Rowe <leah@libreboot.org>
This commit is contained in:
Leah Rowe
2026-03-29 22:15:27 +01:00
parent 01aa95ec15
commit 7fb0b2f692
5 changed files with 38 additions and 4 deletions
+1 -1
View File
@@ -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;