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

Commit 286f367d authored by Mike Snitzer's avatar Mike Snitzer Committed by Alasdair G Kergon
Browse files

dm mpath: fix potential NULL pointer in feature arg processing



Avoid dereferencing a NULL pointer if the number of feature arguments
supplied is fewer than indicated.

Signed-off-by: default avatarMike Snitzer <snitzer@redhat.com>
Signed-off-by: default avatarAlasdair G Kergon <agk@redhat.com>
Cc: stable@kernel.org
parent 762a80d9
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -807,6 +807,11 @@ static int parse_features(struct arg_set *as, struct multipath *m)
	if (!argc)
		return 0;

	if (argc > as->argc) {
		ti->error = "not enough arguments for features";
		return -EINVAL;
	}

	do {
		param_name = shift(as);
		argc--;