lkml.org 
[lkml]   [2014]   [Oct]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 3.16 345/357] partitions: aix.c: off by one bug
    Date
    3.16-stable review patch.  If anyone has any objections, please let me know.

    ------------------

    From: Dan Carpenter <dan.carpenter@oracle.com>

    commit d97a86c170b4e432f76db072a827fe30b4d6f659 upstream.

    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>
    Acked-by: Philippe De Muyter <phdm@macqel.be>
    Signed-off-by: Jens Axboe <axboe@fb.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

    ---
    block/partitions/aix.c | 2 +-
    1 file changed, 1 insertion(+), 1 deletion(-)

    --- a/block/partitions/aix.c
    +++ b/block/partitions/aix.c
    @@ -253,7 +253,7 @@ int aix_partition(struct parsed_partitio
    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;
    }



    \
     
     \ /
      Last update: 2014-10-04 00:41    [W:2.908 / U:0.008 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site