diff options
| author | Leah Rowe <leah@libreboot.org> | 2026-03-13 17:53:19 +0000 |
|---|---|---|
| committer | Leah Rowe <leah@libreboot.org> | 2026-03-13 17:53:19 +0000 |
| commit | dfbdffc6a620b383f8a2ecb5cf6d564073a4b9a0 (patch) | |
| tree | 77035a99f54aef61c6097d6c640c0cc05b310365 /util/nvmutil/nvmutil.c | |
| parent | 5287a80a7efa5246e75c926f66482e149d7af0dd (diff) | |
util/nvmutil: check null pointer in io_args
Signed-off-by: Leah Rowe <leah@libreboot.org>
Diffstat (limited to 'util/nvmutil/nvmutil.c')
| -rw-r--r-- | util/nvmutil/nvmutil.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/util/nvmutil/nvmutil.c b/util/nvmutil/nvmutil.c index e5a21afc..b917776c 100644 --- a/util/nvmutil/nvmutil.c +++ b/util/nvmutil/nvmutil.c @@ -1753,6 +1753,9 @@ static int io_args(int fd, void *mem, size_t nrw, off_t off, int rw_type) { + if (mem == NULL) + goto err_io_args; + if (mem != (void *)pad && mem != rnum && (mem < (void *)buf || mem >= (void *)(buf + GBE_FILE_SIZE))) |
