diff options
| author | Leah Rowe <leah@libreboot.org> | 2026-03-13 15:30:58 +0000 |
|---|---|---|
| committer | Leah Rowe <leah@libreboot.org> | 2026-03-13 15:30:58 +0000 |
| commit | c2c483dcbe95b399daab1e98678a7f2dfb52418e (patch) | |
| tree | fab730d43f08d71de999d74386471474fa75fbfc /util | |
| parent | 6315bf0025e9bb92ac6e8655ba644f039f3cb106 (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.c | 4 |
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 && |
