Skip to content

Commit

Permalink
partitions: aix.c: off by one bug
Browse files Browse the repository at this point in the history
The lvip[] array has "state->limit" elements so the condition here
should be >= instead of >.

Fixes: 6ceea22 ('partitions: add aix lvm partition support files')
Signed-off-by: Dan Carpenter <[email protected]>
Acked-by: Philippe De Muyter <[email protected]>
Signed-off-by: Jens Axboe <[email protected]>
  • Loading branch information
Dan Carpenter authored and axboe committed Aug 5, 2014
1 parent 2a1b4cf commit d97a86c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion block/partitions/aix.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit d97a86c

Please sign in to comment.