diff options
author | Roel Kluin <roel.kluin@gmail.com> | 2009-06-10 15:52:44 -0400 |
---|---|---|
committer | Karsten Keil <keil@b1-systems.de> | 2009-06-11 13:05:10 -0400 |
commit | 395df11f5fa7fe852be28ccec8aaa15634386ad1 (patch) | |
tree | 6d6fcd36173e73d0ca8d6aebc7a7942de2959dcb /drivers | |
parent | cdae28e1a28f26c765c5882a48b9fd4a5b9ce91c (diff) |
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')
-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 1a2222cbb805..b4d4522e5071 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) | |||
1592 | int retval, line; | 1592 | int retval, line; |
1593 | 1593 | ||
1594 | line = tty->index; | 1594 | line = tty->index; |
1595 | if (line < 0 || line > ISDN_MAX_CHANNELS) | 1595 | if (line < 0 || line >= ISDN_MAX_CHANNELS) |
1596 | return -ENODEV; | 1596 | return -ENODEV; |
1597 | info = &dev->mdm.info[line]; | 1597 | info = &dev->mdm.info[line]; |
1598 | if (isdn_tty_paranoia_check(info, tty->name, "isdn_tty_open")) | 1598 | if (isdn_tty_paranoia_check(info, tty->name, "isdn_tty_open")) |