util/nvmutil: fix cast check

Signed-off-by: Leah Rowe <leah@libreboot.org>
This commit is contained in:
Leah Rowe
2026-03-14 17:58:06 +00:00
parent ec98e3143c
commit c5c629d776
+1 -1
View File
@@ -1850,7 +1850,7 @@ rw_file_exact(int fd, u8 *mem, size_t nrw,
}
/* Prevent theoretical overflow */
if (rv > nrw - rc)
if ((size_t)rv > nrw - rc)
goto err_rw_file_exact;
rc += (size_t)rv;