summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeah Rowe <leah@libreboot.org>2026-03-14 17:58:06 +0000
committerLeah Rowe <leah@libreboot.org>2026-03-26 06:59:41 +0000
commitc5c629d7763e7fdbbe614c08dfbefae9acc65eda (patch)
tree5a9d4ae0f3072184f9c16c6a8da3ae5e974da17a
parentec98e3143cdff802f704fe1e14f1020499e026d5 (diff)
util/nvmutil: fix cast check
Signed-off-by: Leah Rowe <leah@libreboot.org>
-rw-r--r--util/nvmutil/nvmutil.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/util/nvmutil/nvmutil.c b/util/nvmutil/nvmutil.c
index c05487cf..c09ecd85 100644
--- a/util/nvmutil/nvmutil.c
+++ b/util/nvmutil/nvmutil.c
@@ -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;