fbcon: fix rotate upside down crash
authorStefani Seibold <stefani@seibold.net>
Thu, 6 Aug 2009 22:07:30 +0000 (15:07 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 7 Aug 2009 17:39:55 +0000 (10:39 -0700)
commit93274e4d4e9416ad1fa47e2f26011e2c483fe5fe
tree0eab51b9489a19925bf03fa5f497eb8749df2645
parent69dd647f969c28d18de77e2153f30d05a1874571
fbcon: fix rotate upside down crash

Fix the rotate_ud() function not to crash in case of a font which has not
a width of multiple by 8: The inner loop of the font pixel copy should not
access a bit outside the font memory area.  Subtract the shift offset from
the font width will prevent this.

Signed-off-by: Stefani Seibold <stefani@seibold.net>
Cc: Krzysztof Helt <krzysztof.h1@poczta.fm>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/video/console/fbcon_rotate.h