mirror of
https://codeberg.org/libreboot/lbmk.git
synced 2026-07-21 19:26:22 +02:00
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>
This commit is contained in:
@@ -1716,8 +1716,8 @@ static int
|
|||||||
io_args(int fd, size_t nrw,
|
io_args(int fd, size_t nrw,
|
||||||
off_t off, int rw_type)
|
off_t off, int rw_type)
|
||||||
{
|
{
|
||||||
if (off > 0
|
if (off != 0
|
||||||
&& off != GBE_PART_SIZE)
|
&& off != gbe_file_offset(1, "i/o check"))
|
||||||
goto err_io_args;
|
goto err_io_args;
|
||||||
|
|
||||||
if (nrw != GBE_PART_SIZE &&
|
if (nrw != GBE_PART_SIZE &&
|
||||||
|
|||||||
Reference in New Issue
Block a user