projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
762a80d
)
dm mpath: fix potential NULL pointer in feature arg processing
author
Mike Snitzer
<snitzer@redhat.com>
Tue, 2 Aug 2011 11:32:00 +0000
(12:32 +0100)
committer
Alasdair G Kergon
<agk@redhat.com>
Tue, 2 Aug 2011 11:32:00 +0000
(12:32 +0100)
Avoid dereferencing a NULL pointer if the number of feature arguments
supplied is fewer than indicated.
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
Cc: stable@kernel.org
drivers/md/dm-mpath.c
patch
|
blob
|
history
diff --git
a/drivers/md/dm-mpath.c
b/drivers/md/dm-mpath.c
index c3547016f0f1e7156d1b28b0fded62b5bf534008..adf851a081bd512f1a12fed3df76cfde6acec975 100644
(file)
--- a/
drivers/md/dm-mpath.c
+++ b/
drivers/md/dm-mpath.c
@@
-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--;