From: Vladimir Serbinenko Date: Wed, 21 Jan 2015 14:51:49 +0000 (+0100) Subject: grub_menu_init_page: Avoid returning 0 geometry to avoid divisions by 0. X-Git-Tag: 2.02-beta3~554 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=44b38e49885ffcb286e796b572f3f862f3be371a;p=thirdparty%2Fgrub.git grub_menu_init_page: Avoid returning 0 geometry to avoid divisions by 0. --- diff --git a/ChangeLog b/ChangeLog index 4b9f9b21a..3383d469e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2015-01-20 Vladimir Serbinenko + + * grub-core/normal/menu_text.c (grub_menu_init_page): Avoid + returning 0 geometry to avoid divisions by 0. + 2015-01-20 Vladimir Serbinenko * grub-core/osdep/unix/cputime.c (grub_util_get_cpu_time_ms): Cache diff --git a/grub-core/normal/menu_text.c b/grub-core/normal/menu_text.c index 2ff294101..e22bb91f6 100644 --- a/grub-core/normal/menu_text.c +++ b/grub-core/normal/menu_text.c @@ -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) {