diff options
author | Roel Kluin <roel.kluin@gmail.com> | 2009-06-10 12:52:44 -0700 |
---|---|---|
committer | Karsten Keil <keil@b1-systems.de> | 2009-06-11 19:05:10 +0200 |
commit | 395df11f5fa7fe852be28ccec8aaa15634386ad1 (patch) | |
tree | 6d6fcd36173e73d0ca8d6aebc7a7942de2959dcb /drivers/isdn/i4l | |
parent | cdae28e1a28f26c765c5882a48b9fd4a5b9ce91c (diff) | |
download | blackbird-op-linux-395df11f5fa7fe852be28ccec8aaa15634386ad1.tar.gz blackbird-op-linux-395df11f5fa7fe852be28ccec8aaa15634386ad1.zip |
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 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) 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")) |