lkml.org 
[lkml]   [2014]   [Aug]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch] partitions: aix.c: off by one bug
On 08/05/2014 02:09 AM, Dan Carpenter wrote:
> 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;
> }
>

Applied, thanks.

--
Jens Axboe



\
 
 \ /
  Last update: 2014-08-05 21:21    [W:0.172 / U:0.076 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site