summaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
authorLeah Rowe <leah@libreboot.org>2026-03-13 15:30:58 +0000
committerLeah Rowe <leah@libreboot.org>2026-03-13 15:30:58 +0000
commitc2c483dcbe95b399daab1e98678a7f2dfb52418e (patch)
treefab730d43f08d71de999d74386471474fa75fbfc /util
parent6315bf0025e9bb92ac6e8655ba644f039f3cb106 (diff)
nvmutil: fix bound check in last commit
i was fixing the size, but it should be calculated properly. Signed-off-by: Leah Rowe <leah@libreboot.org>
Diffstat (limited to 'util')
-rw-r--r--util/nvmutil/nvmutil.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/util/nvmutil/nvmutil.c b/util/nvmutil/nvmutil.c
index da7c426c..6b7be3df 100644
--- a/util/nvmutil/nvmutil.c
+++ b/util/nvmutil/nvmutil.c
@@ -1716,8 +1716,8 @@ static int
io_args(int fd, size_t nrw,
off_t off, int rw_type)
{
- if (off > 0
- && off != GBE_PART_SIZE)
+ if (off != 0
+ && off != gbe_file_offset(1, "i/o check"))
goto err_io_args;
if (nrw != GBE_PART_SIZE &&