提交 286f367d 编写于 作者: M Mike Snitzer 提交者: Alasdair G Kergon

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: NMike Snitzer <snitzer@redhat.com>
Signed-off-by: NAlasdair G Kergon <agk@redhat.com>
Cc: stable@kernel.org
上级 762a80d9
......@@ -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--;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册