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
2008-06-20 14:05:55 -06:00
2008-12-13 11:25:49 -08:00
2009-10-01 16:11:16 -07:00
2008-10-20 08:52:41 -07:00
2008-12-13 09:12:07 +00:00
2009-06-19 16:46:06 -07:00
2009-09-21 15:14:58 +02:00
2008-07-20 17:12:36 -07:00
2008-06-20 14:05:57 -06:00
2009-06-18 11:16:55 +10:00
2009-01-02 10:28:32 -08:00
2009-07-12 12:22:34 -07:00
2009-09-15 08:42:00 -07:00
2008-02-07 08:42:25 -08: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
2008-04-30 08:29:43 -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
2007-02-12 09:48:30 -08:00
2009-06-18 13:03:54 -07:00
2009-09-19 13:13:37 -07:00
2008-07-20 17:12:38 -07:00
2009-07-12 12:22:34 -07:00
2009-01-08 16:44:03 -07:00
2009-02-22 09:23:02 -08:00
2009-06-11 08:51:01 -07:00
2009-03-16 08:34:35 -06:00
2008-07-20 17:12:38 -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
2008-06-20 14:05:51 -06:00
2008-04-30 23:15:34 +02: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