diff --git a/ChangeLog b/ChangeLog index 7d5a651ed..dc882d858 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2015-01-20 Vladimir Serbinenko + + * grub-core/term/gfxterm.c: Avoid division by zero. + 2015-01-20 Vladimir Serbinenko Avoid division by zero in serial. diff --git a/grub-core/term/gfxterm.c b/grub-core/term/gfxterm.c index dc0669b35..70f10f19c 100644 --- a/grub-core/term/gfxterm.c +++ b/grub-core/term/gfxterm.c @@ -221,6 +221,8 @@ grub_virtual_screen_setup (unsigned int x, unsigned int y, calculate_normal_character_width (virtual_screen.font); virtual_screen.normal_char_height = grub_font_get_max_char_height (virtual_screen.font); + if (virtual_screen.normal_char_height == 0) + virtual_screen.normal_char_height = 16; virtual_screen.cursor_x = 0; virtual_screen.cursor_y = 0; virtual_screen.cursor_state = 1;