mirror of
https://github.com/adulau/aha.git
synced 2024-12-28 11:46:19 +00:00
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>
This commit is contained in:
parent
cdae28e1a2
commit
395df11f5f
1 changed files with 1 additions and 1 deletions
|
@ -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"))
|
||||
|
|
Loading…
Reference in a new issue