mirror of
https://codeberg.org/libreboot/lbmk.git
synced 2026-03-25 13:29:03 +02:00
util/nvmutil: check overflow in io_args
Signed-off-by: Leah Rowe <leah@libreboot.org>
This commit is contained in:
@@ -1761,6 +1761,9 @@ 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)
|
||||
goto err_io_args;
|
||||
|
||||
if (nrw > GBE_PART_SIZE)
|
||||
goto err_io_args;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user