mirror of
https://github.com/hardkernel/linux.git
synced 2026-03-24 19:40:21 +09:00
partitions: aix.c: off by one bug
commitd97a86c170upstream. 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> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
5257a3de5b
commit
763e95c4ac
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user