]> git.baikalelectronics.ru Git - kernel.git/commit
serial: jsm: some off by one bugs
authorDan Carpenter <dan.carpenter@oracle.com>
Tue, 17 Mar 2015 09:17:28 +0000 (12:17 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 26 Mar 2015 22:00:36 +0000 (23:00 +0100)
commit431a550e11441db91c53f11388310a41940f6c6b
treeeafdaa1b060e9455efeda541e5feb783f996d764
parent8940a99c6290e38341412880da722f394a929ad7
serial: jsm: some off by one bugs

"brd->nasync" amd "brd->maxports" are the same.  They hold the number of
filled out channels in the brd->channels[] array.  These tests should
be ">=" instead of ">" so that we don't read one element past the end.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Thadeu Lima de Souza Cascardo <cascardo@linux.vnet.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/jsm/jsm_cls.c
drivers/tty/serial/jsm/jsm_neo.c