diff options
Diffstat (limited to 'util/nvmutil/nvmutil.c')
| -rw-r--r-- | util/nvmutil/nvmutil.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/util/nvmutil/nvmutil.c b/util/nvmutil/nvmutil.c index b917776c..0185150f 100644 --- a/util/nvmutil/nvmutil.c +++ b/util/nvmutil/nvmutil.c @@ -1764,7 +1764,7 @@ io_args(int fd, void *mem, size_t nrw, if (off < 0 || off >= gbe_file_size) goto err_io_args; - if ((off_t)(off + nrw) > gbe_file_size) + if (nrw > (size_t)(gbe_file_size - off)) goto err_io_args; if (nrw > GBE_PART_SIZE) |
