Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 395df11f authored by Roel Kluin's avatar Roel Kluin Committed by Karsten Keil
Browse files

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: default avatarRoel Kluin <roel.kluin@gmail.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Acked-by: default avatarKarsten Keil <keil@b1-systems.de>
parent cdae28e1
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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"))