aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoel Kluin <roel.kluin@gmail.com>2009-06-10 12:52:44 -0700
committerKarsten Keil <keil@b1-systems.de>2009-06-11 19:05:10 +0200
commit395df11f5fa7fe852be28ccec8aaa15634386ad1 (patch)
tree6d6fcd36173e73d0ca8d6aebc7a7942de2959dcb
parentcdae28e1a28f26c765c5882a48b9fd4a5b9ce91c (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>
-rw-r--r--drivers/isdn/i4l/isdn_tty.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/isdn/i4l/isdn_tty.c b/drivers/isdn/i4l/isdn_tty.c
index 1a2222cbb80..b4d4522e507 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"))