提交 d97a86c1 编写于 作者: D Dan Carpenter 提交者: 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: NDan Carpenter <dan.carpenter@oracle.com>
Acked-by: NPhilippe De Muyter <phdm@macqel.be>
Signed-off-by: NJens Axboe <axboe@fb.com>
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册