diff options
author | Roel Kluin <roel.kluin@gmail.com> | 2009-06-10 19:52:44 (GMT) |
---|---|---|
committer | Karsten Keil <keil@b1-systems.de> | 2009-06-11 17:05:10 (GMT) |
commit | 395df11f5fa7fe852be28ccec8aaa15634386ad1 (patch) | |
tree | 6d6fcd36173e73d0ca8d6aebc7a7942de2959dcb /drivers/isdn/i4l | |
parent | cdae28e1a28f26c765c5882a48b9fd4a5b9ce91c (diff) | |
download | linux-fsl-qoriq-395df11f5fa7fe852be28ccec8aaa15634386ad1.tar.xz |
drivers/isdn/i4l/isdn_tty.c: fix check for array overindexing
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>
Diffstat (limited to 'drivers/isdn/i4l')
-rw-r--r-- | 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")) |