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-26 06:59:41 +0000
commit98466398f97ca7e3466148761e3ad238e075d7bf (patch)
treef28596e9900457b4a389f3ee9777969ab30af973 /util
parente44b297db5ceea4e6e621896626db017a7431f0e (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 &&