Skip to content

Commit

Permalink
fbdev: avoid vertical overflow when making space for the logo
Browse files Browse the repository at this point in the history
fbcon_prepare_logo(): Avoid vertical overflow when making space for the logo

Signed-off-by: Geert Uytterhoeven <[email protected]>
Signed-off-by: Geoff Levand <[email protected]>
Acked-By: James Simmons <[email protected]>
Cc: "Antonino A. Daplas" <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
Geert Uytterhoeven authored and Linus Torvalds committed May 8, 2007
1 parent 538c792 commit 250038f
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions drivers/video/console/fbcon.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 250038f

Please sign in to comment.