mirror of
https://codeberg.org/libreboot/lbmk.git
synced 2026-07-11 05:52:36 +02:00
util/nvmutil: fix cast check
Signed-off-by: Leah Rowe <leah@libreboot.org>
This commit is contained in:
@@ -1850,7 +1850,7 @@ rw_file_exact(int fd, u8 *mem, size_t nrw,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Prevent theoretical overflow */
|
/* Prevent theoretical overflow */
|
||||||
if (rv > nrw - rc)
|
if ((size_t)rv > nrw - rc)
|
||||||
goto err_rw_file_exact;
|
goto err_rw_file_exact;
|
||||||
|
|
||||||
rc += (size_t)rv;
|
rc += (size_t)rv;
|
||||||
|
|||||||
Reference in New Issue
Block a user