public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] fbcon: rotate upside down crash
@ 2009-07-28  8:01 Stefani Seibold
  2009-07-29 20:28 ` Andrew Morton
  0 siblings, 1 reply; 4+ messages in thread
From: Stefani Seibold @ 2009-07-28  8:01 UTC (permalink / raw)
  To: linux-kernel; +Cc: Andrew Morton

Attached is a bug fix for the frame console. 

The current frame buffer console upside down functionality will crash
using a font which has not a width of multiple by 8. 

The following 1 liner will fix the rotate_ud() function,

ChangeLog:
 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.

 fbcon_rotate.h |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Signed-off-by: Stefani Seibold <stefani@seibold.net>

--- linux-2.6.31-rc4.orig/drivers/video/console/fbcon_rotate.h	2009-06-10 05:05:27.000000000 +0200
+++ linux-2.6.31-rc4/drivers/video/console/fbcon_rotate.h	2009-07-24 20:37:31.000000000 +0200
@@ -45,7 +45,7 @@
 	width = (width + 7) & ~7;
 
 	for (i = 0; i < height; i++) {
-		for (j = 0; j < width; j++) {
+		for (j = 0; j < width - shift; j++) {
 			if (pattern_test_bit(j, i, width, in))
 				pattern_set_bit(width - (1 + j + shift),
 						height - (1 + i),



^ permalink raw reply	[flat|nested] 4+ messages in thread
* [PATCH] fbcon: rotate upside down crash
@ 2009-07-24 19:23 Stefani Seibold
  2009-07-27 23:33 ` Andrew Morton
  0 siblings, 1 reply; 4+ messages in thread
From: Stefani Seibold @ 2009-07-24 19:23 UTC (permalink / raw)
  To: linux-kernel; +Cc: Andrew Morton, adaplas

Attached is a bug fix for the frame console. 

The current frame buffer console upside down functionality will crash
using a font which has not a width of multiple by 8. 

The following 1 liner will fix the rotate_ud() function,

 fbcon_rotate.h |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- linux-2.6.31-rc4/drivers/video/console/fbcon_rotate.h	2009-07-24
20:37:31.000000000 +0200
+++ linux-2.6.31-rc4.orig/drivers/video/console/fbcon_rotate.h
2009-06-10 05:05:27.000000000 +0200
@@ -45,7 +45,7 @@
 	width = (width + 7) & ~7;
 
 	for (i = 0; i < height; i++) {
-		for (j = 0; j < width - shift; j++) {
+		for (j = 0; j < width; j++) {
 			if (pattern_test_bit(j, i, width, in))
 				pattern_set_bit(width - (1 + j + shift),
 						height - (1 + i),



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-07-29 20:29 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-28  8:01 [PATCH] fbcon: rotate upside down crash Stefani Seibold
2009-07-29 20:28 ` Andrew Morton
  -- strict thread matches above, loose matches on Subject: below --
2009-07-24 19:23 Stefani Seibold
2009-07-27 23:33 ` Andrew Morton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox