提交 395df11f 编写于 作者: R Roel Kluin 提交者: Karsten Keil

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: NRoel Kluin <roel.kluin@gmail.com>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Acked-by: NKarsten Keil <keil@b1-systems.de>
上级 cdae28e1
......@@ -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"))
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册