]> git.proxmox.com Git - grub2.git/commitdiff
grub_menu_init_page: Avoid returning 0 geometry to avoid divisions by 0.
authorVladimir Serbinenko <phcoder@gmail.com>
Wed, 21 Jan 2015 14:51:49 +0000 (15:51 +0100)
committerVladimir Serbinenko <phcoder@gmail.com>
Wed, 21 Jan 2015 16:42:15 +0000 (17:42 +0100)
ChangeLog
grub-core/normal/menu_text.c

index 4b9f9b21ae4188d5f4b3d02e84cdd2b231fcc2e2..3383d469ed6e93fb82ee7b7196a8db06e00f7093 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -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
index 2ff294101d8f5cf8f79ca2c36040f8d409f8d41c..e22bb91f6e82959a44efbbfeb7a080bd26cc99d7 100644 (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)
     {