mirror of
https://codeberg.org/libreboot/lbmk.git
synced 2026-07-22 13:51:31 +02:00
util/nvmutil: block bad offset in io_args
Signed-off-by: Leah Rowe <leah@libreboot.org>
This commit is contained in:
@@ -1716,6 +1716,10 @@ static int
|
|||||||
io_args(int fd, void *mem, size_t nrw,
|
io_args(int fd, void *mem, size_t nrw,
|
||||||
off_t off, int rw_type)
|
off_t off, int rw_type)
|
||||||
{
|
{
|
||||||
|
if (off > 0
|
||||||
|
&& off != GBE_PART_SIZE)
|
||||||
|
goto err_io_args;
|
||||||
|
|
||||||
if (nrw != GBE_PART_SIZE &&
|
if (nrw != GBE_PART_SIZE &&
|
||||||
nrw != NVM_SIZE &&
|
nrw != NVM_SIZE &&
|
||||||
nrw != NUM_RANDOM_BYTES)
|
nrw != NUM_RANDOM_BYTES)
|
||||||
|
|||||||
Reference in New Issue
Block a user