* include/grub/kernel.h (FOR_MODULES): Check module magic.

This commit is contained in:
Vladimir 'phcoder' Serbinenko 2012-02-29 19:02:18 +01:00
parent 9d742bd431
commit a132afc371
2 changed files with 5 additions and 1 deletions

View file

@ -1,3 +1,7 @@
2012-02-29 Vladimir Serbinenko <phcoder@gmail.com>
* include/grub/kernel.h (FOR_MODULES): Check module magic.
2012-02-29 Vladimir Serbinenko <phcoder@gmail.com>
* util/grub-mkimagexx.c (locate_sections): Support non-standard

View file

@ -72,7 +72,7 @@ struct grub_module_info64
extern grub_addr_t EXPORT_VAR (grub_modbase);
#define FOR_MODULES(var) for (\
var = grub_modbase ? (struct grub_module_header *) \
var = (grub_modbase && ((((struct grub_module_info *) grub_modbase)->magic) == GRUB_MODULE_MAGIC)) ? (struct grub_module_header *) \
(grub_modbase + (((struct grub_module_info *) grub_modbase)->offset)) : 0;\
var && (grub_addr_t) var \
< (grub_modbase + (((struct grub_module_info *) grub_modbase)->size)); \