Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2ca4c92f authored by Alasdair G Kergon's avatar Alasdair G Kergon
Browse files

dm ioctl: prevent empty message



Detect invalid empty messages in core dm instead of requiring every target to
check this.

Signed-off-by: default avatarAlasdair G Kergon <agk@redhat.com>
parent 13c87583
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -1402,6 +1402,11 @@ static int target_message(struct dm_ioctl *param, size_t param_size)
		goto out;
	}

	if (!argc) {
		DMWARN("Empty message received.");
		goto out;
	}

	table = dm_get_live_table(md);
	if (!table)
		goto out_argv;