From: Roel Kluin Date: Thu, 1 Oct 2009 22:44:25 +0000 (-0700) Subject: serial167: fix read buffer overflow X-Git-Tag: v2.6.32-rc3~24 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f23fc156fb4294f678f1913a56da633fa57edb2d;p=pandora-kernel.git 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 Cc: Alan Cox Cc: Jiri Slaby Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- Reading git-diff-tree failed