Commit d97a86c1 authored by Dan Carpenter's avatar Dan Carpenter Committed by Jens Axboe

partitions: aix.c: off by one bug

The lvip[] array has "state->limit" elements so the condition here
should be >= instead of >.

Fixes: 6ceea22b ('partitions: add aix lvm partition support files')
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Acked-by: default avatarPhilippe De Muyter <phdm@macqel.be>
Signed-off-by: default avatarJens Axboe <axboe@fb.com>
parent 2a1b4cf2
......@@ -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;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment