1
0
Fork 0

partitions: aix.c: off by one bug

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

Fixes: 6ceea22bbb ('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>
hifive-unleashed-5.1
Dan Carpenter 2014-08-05 11:09:59 +03:00 committed by Jens Axboe
parent 2a1b4cf233
commit d97a86c170
1 changed files with 1 additions and 1 deletions

View File

@ -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;
}