summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2014-08-05 11:09:59 +0300
committerJiri Slaby <jslaby@suse.cz>2014-10-13 15:41:40 +0200
commit0dd03a746211ee0b7a901e382fdf8c15acbde80c (patch)
tree5f894422ad7c88c911ed58d0d2e6b9e5c16ebdaa
parenta989feb087a51f54e00e36baace383cfffbf5fdb (diff)
partitions: aix.c: off by one bug
commit d97a86c170b4e432f76db072a827fe30b4d6f659 upstream. The lvip[] array has "state->limit" elements so the condition here should be >= instead of >. Fixes: 6ceea22bbbc8 ('partitions: add aix lvm partition support files') Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Acked-by: Philippe De Muyter <phdm@macqel.be> Signed-off-by: Jens Axboe <axboe@fb.com> Signed-off-by: Jiri Slaby <jslaby@suse.cz>
-rw-r--r--block/partitions/aix.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/block/partitions/aix.c b/block/partitions/aix.c
index 43be471d9b1d..0931f5136ab2 100644
--- a/block/partitions/aix.c
+++ b/block/partitions/aix.c
@@ -253,7 +253,7 @@ int aix_partition(struct parsed_partitions *state)
continue;
}
lv_ix = be16_to_cpu(p->lv_ix) - 1;
- if (lv_ix > state->limit) {
+ if (lv_ix >= state->limit) {
cur_lv_ix = -1;
continue;
}