lkml.org 
[lkml]   [2009]   [Jun]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    Subject[PATCH 4/6] drivers/isdn/i4l/isdn_tty.c: fix check for array overindexing
    From
    From: Roel Kluin <roel.kluin@gmail.com>

    The check for overindexing of dev->mdm.info[] has an off-by-one.

    Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Acked-by: Karsten Keil <keil@b1-systems.de>
    ---
    drivers/isdn/i4l/isdn_tty.c | 2 +-
    1 files changed, 1 insertions(+), 1 deletions(-)

    diff --git a/drivers/isdn/i4l/isdn_tty.c b/drivers/isdn/i4l/isdn_tty.c
    index 1a2222c..b4d4522 100644
    --- a/drivers/isdn/i4l/isdn_tty.c
    +++ b/drivers/isdn/i4l/isdn_tty.c
    @@ -1592,7 +1592,7 @@ isdn_tty_open(struct tty_struct *tty, struct file *filp)
    int retval, line;

    line = tty->index;
    - if (line < 0 || line > ISDN_MAX_CHANNELS)
    + if (line < 0 || line >= ISDN_MAX_CHANNELS)
    return -ENODEV;
    info = &dev->mdm.info[line];
    if (isdn_tty_paranoia_check(info, tty->name, "isdn_tty_open"))
    --
    1.6.0.2


    \
     
     \ /
      Last update: 2009-06-11 19:33    [W:0.022 / U:148.996 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site