From dfbdffc6a620b383f8a2ecb5cf6d564073a4b9a0 Mon Sep 17 00:00:00 2001 From: Leah Rowe Date: Fri, 13 Mar 2026 17:53:19 +0000 Subject: util/nvmutil: check null pointer in io_args Signed-off-by: Leah Rowe --- util/nvmutil/nvmutil.c | 3 +++ 1 file changed, 3 insertions(+) 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))) -- cgit v1.2.1