summaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
authorLeah Rowe <leah@libreboot.org>2026-03-14 17:58:06 +0000
committerLeah Rowe <leah@libreboot.org>2026-03-14 17:58:06 +0000
commit573fdf0b22e1a04f35909186d62eebc5da53b74e (patch)
tree68c7ce28cee339c967eaafa12b08e32fbcc61572 /util
parentea210177fd0858e710901ec302d2ab8caf14c361 (diff)
util/nvmutil: fix cast check
Signed-off-by: Leah Rowe <leah@libreboot.org>
Diffstat (limited to 'util')
-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;