mirror of
https://codeberg.org/libreboot/lbmk.git
synced 2026-07-18 14:12:44 +02:00
util/nvmutil: check null pointer in io_args
Signed-off-by: Leah Rowe <leah@libreboot.org>
This commit is contained in:
@@ -1753,6 +1753,9 @@ 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 (mem == NULL)
|
||||||
|
goto err_io_args;
|
||||||
|
|
||||||
if (mem != (void *)pad
|
if (mem != (void *)pad
|
||||||
&& mem != rnum
|
&& mem != rnum
|
||||||
&& (mem < (void *)buf || mem >= (void *)(buf + GBE_FILE_SIZE)))
|
&& (mem < (void *)buf || mem >= (void *)(buf + GBE_FILE_SIZE)))
|
||||||
|
|||||||
Reference in New Issue
Block a user