]> git.proxmox.com Git - grub2.git/commitdiff
* grub-core/kern/i386/coreboot/mmap.c (grub_linuxbios_table_iterate):
authorVladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Thu, 28 Feb 2013 12:16:39 +0000 (13:16 +0100)
committerVladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Thu, 28 Feb 2013 12:16:39 +0000 (13:16 +0100)
Fix end of table condition.

ChangeLog
grub-core/kern/i386/coreboot/mmap.c
include/grub/i386/coreboot/lbio.h

index 21ec9a9a610ca1e58331b6e424a3f2f365794c8a..0eb0516a0150f885fb96e4ced4c891bc68df823f 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2013-02-28  Vladimir Serbinenko  <phcoder@gmail.com>
+
+       * grub-core/kern/i386/coreboot/mmap.c (grub_linuxbios_table_iterate):
+       Fix end of table condition.
+
 2013-02-28  Vladimir Serbinenko  <phcoder@gmail.com>
 
        * grub-core/lib/arg.c (grub_arg_show_help): Move showargs
index ae4af083c948803effe795ee5231bcedfadadaf6..47efb723df666aaf3bf43d68900b040b1e5292f4 100644 (file)
@@ -58,8 +58,10 @@ signature_found:
 
   table_item =
     (grub_linuxbios_table_item_t) ((long) table_header +
-                              (long) table_header->size);
-  for (; table_item->size;
+                              (long) table_header->header_size);
+  for (; table_item < (grub_linuxbios_table_item_t) ((long) table_header
+                                                    + (long) table_header->header_size
+                                                    + (long) table_header->table_size);
        table_item = (grub_linuxbios_table_item_t) ((long) table_item + (long) table_item->size))
     {
       if (table_item->tag == GRUB_LINUXBIOS_MEMBER_LINK
index aa18539338fbd0ea6505bdd304d9895853791724..bac549247aae0717383a554197be048068efb45f 100644 (file)
 
 struct grub_linuxbios_table_header
 {
-  char signature[4];
-  grub_uint32_t size;
+  grub_uint8_t signature[4];
+  grub_uint32_t header_size;
+  grub_uint32_t header_checksum;
+  grub_uint32_t table_size;
+  grub_uint32_t table_checksum;
+  grub_uint32_t table_entries;
 };
 typedef struct grub_linuxbios_table_header *grub_linuxbios_table_header_t;