summaryrefslogtreecommitdiffstats
path: root/drivers/video/console
diff options
context:
space:
mode:
authorGeert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>2007-05-08 09:37:53 +0200
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-05-08 20:15:27 +0200
commit250038f5a7207796fb54aff3dc686d664659cf0c (patch)
tree13b0ff75f25f4e1d8f5769e23dc1bac28fe11ba3 /drivers/video/console
parentremove unused header file: drivers/video/riva/nv4ref.h (diff)
downloadlinux-250038f5a7207796fb54aff3dc686d664659cf0c.tar.xz
linux-250038f5a7207796fb54aff3dc686d664659cf0c.zip
fbdev: avoid vertical overflow when making space for the logo
fbcon_prepare_logo(): Avoid vertical overflow when making space for the logo Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com> Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com> Acked-By: James Simmons <jsimmons@infradead.org> Cc: "Antonino A. Daplas" <adaplas@pol.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/video/console')
-rw-r--r--drivers/video/console/fbcon.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/video/console/fbcon.c b/drivers/video/console/fbcon.c
index 0429fd2cece0..bd131d472e24 100644
--- a/drivers/video/console/fbcon.c
+++ b/drivers/video/console/fbcon.c
@@ -618,8 +618,13 @@ static void fbcon_prepare_logo(struct vc_data *vc, struct fb_info *info,
r -= cols;
}
if (!save) {
- vc->vc_y += logo_lines;
- vc->vc_pos += logo_lines * vc->vc_size_row;
+ int lines;
+ if (vc->vc_y + logo_lines >= rows)
+ lines = rows - vc->vc_y - 1;
+ else
+ lines = logo_lines;
+ vc->vc_y += lines;
+ vc->vc_pos += lines * vc->vc_size_row;
}
}
scr_memsetw((unsigned short *) vc->vc_origin,