Commit 9b117b10 authored by Dan Carpenter's avatar Dan Carpenter Committed by Greg Kroah-Hartman

partitions: aix.c: off by one bug

commit d97a86c1 upstream.

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>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 65862be0
...@@ -253,7 +253,7 @@ int aix_partition(struct parsed_partitions *state) ...@@ -253,7 +253,7 @@ int aix_partition(struct parsed_partitions *state)
continue; continue;
} }
lv_ix = be16_to_cpu(p->lv_ix) - 1; lv_ix = be16_to_cpu(p->lv_ix) - 1;
if (lv_ix > state->limit) { if (lv_ix >= state->limit) {
cur_lv_ix = -1; cur_lv_ix = -1;
continue; 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