From c2c483dcbe95b399daab1e98678a7f2dfb52418e Mon Sep 17 00:00:00 2001 From: Leah Rowe Date: Fri, 13 Mar 2026 15:30:58 +0000 Subject: nvmutil: fix bound check in last commit i was fixing the size, but it should be calculated properly. Signed-off-by: Leah Rowe --- util/nvmutil/nvmutil.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'util') 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 && -- cgit v1.2.1