summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--util/nvmutil/nvmutil.c3
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)))