[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20140805080959.GA13605@mwanda>
Date: Tue, 5 Aug 2014 11:09:59 +0300
From: Dan Carpenter <dan.carpenter@...cle.com>
To: Jens Axboe <axboe@...nel.dk>, Philippe De Muyter <phdm@...qel.be>
Cc: Fabian Frederick <fabf@...net.be>, linux-kernel@...r.kernel.org,
kernel-janitors@...r.kernel.org
Subject: [patch] 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 <dan.carpenter@...cle.com>
diff --git a/block/partitions/aix.c b/block/partitions/aix.c
index 0a6ed54..f3ed7b2 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;
}
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists