From d97a86c170b4e432f76db072a827fe30b4d6f659 Mon Sep 17 00:00:00 2001 From: Dan Carpenter Date: Tue, 5 Aug 2014 11:09:59 +0300 Subject: partitions: aix.c: off by one bug The lvip[] array has "state->limit" elements so the condition here should be >= instead of >. Fixes: 6ceea22bbbc8 ('partitions: add aix lvm partition support files') Signed-off-by: Dan Carpenter Acked-by: Philippe De Muyter Signed-off-by: Jens Axboe --- block/partitions/aix.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'block/partitions/aix.c') diff --git a/block/partitions/aix.c b/block/partitions/aix.c index 0a6ed546331da..f3ed7b2d89bf5 100644 --- a/block/partitions/aix.c +++ b/block/partitions/aix.c @@ -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; } -- cgit v1.2.3