linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch] partitions: aix.c: off by one bug
@ 2014-08-05  8:09 Dan Carpenter
  2014-08-05 10:10 ` Philippe De Muyter
  2014-08-05 19:13 ` Jens Axboe
  0 siblings, 2 replies; 4+ messages in thread
From: Dan Carpenter @ 2014-08-05  8:09 UTC (permalink / raw)
  To: Jens Axboe, Philippe De Muyter
  Cc: Fabian Frederick, linux-kernel, kernel-janitors

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@oracle.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;
 			}

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-08-05 19:13 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-08-05  8:09 [patch] partitions: aix.c: off by one bug Dan Carpenter
2014-08-05 10:10 ` Philippe De Muyter
2014-08-05 10:21   ` Dan Carpenter
2014-08-05 19:13 ` Jens Axboe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).