Roel Kluin f23fc156fb serial167: fix read buffer overflow
Check whether index is within bounds before grabbing the element.

Also, since NR_PORTS is defined ARRAY_SIZE(cy_port), cy_port[NR_PORTS] is
out of bounds as well.

[akpm@linux-foundation.org: cleanup, remove (long) casts]
Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-10-01 16:11:16 -07:00
..
2009-06-11 08:51:01 -07:00
2009-09-24 07:21:03 -07:00
2009-09-22 07:17:42 -07:00
2009-07-12 12:22:34 -07:00
2009-10-01 16:11:16 -07:00
2009-06-19 16:46:06 -07:00
2009-09-21 15:14:58 +02:00
2009-06-18 11:16:55 +10:00
2009-07-12 12:22:34 -07:00
2009-09-15 08:42:00 -07:00
2009-09-27 11:39:25 -07:00
2009-09-23 07:39:29 -07:00
2009-07-12 12:22:34 -07:00
2009-07-12 12:22:34 -07:00
2009-07-12 12:22:34 -07:00
2009-07-20 16:38:43 -07:00
2009-06-18 13:03:54 -07:00
2009-09-19 13:13:37 -07:00
2009-07-12 12:22:34 -07:00
2009-06-11 08:51:01 -07:00
2009-07-12 12:22:34 -07:00
2009-09-01 01:13:31 -07:00
2009-09-01 01:13:31 -07:00
2009-09-01 01:13:31 -07:00
2009-07-03 15:45:29 +01:00
2009-06-11 08:51:02 -07:00
2009-09-19 13:13:35 -07:00
2009-09-19 13:13:36 -07:00
2009-09-23 22:26:32 +09:30
2009-10-01 16:11:12 -07:00
2009-09-19 13:13:35 -07:00