grub_menu_init_page: Avoid returning 0 geometry to avoid divisions by 0.

This commit is contained in:
Vladimir Serbinenko 2015-01-21 15:51:49 +01:00
parent 68581b009f
commit 44b38e4988
2 changed files with 8 additions and 0 deletions

View file

@ -1,3 +1,8 @@
2015-01-20 Vladimir Serbinenko <phcoder@gmail.com>
* grub-core/normal/menu_text.c (grub_menu_init_page): Avoid
returning 0 geometry to avoid divisions by 0.
2015-01-20 Vladimir Serbinenko <phcoder@gmail.com>
* grub-core/osdep/unix/cputime.c (grub_util_get_cpu_time_ms): Cache

View file

@ -369,6 +369,9 @@ grub_menu_init_page (int nested, int edit,
geo->border = 0;
}
if (geo->entry_width <= 0)
geo->entry_width = 1;
if (geo->num_entries - msg_num_lines < 3
&& geo->timeout_lines == 2)
{