diff --git a/ChangeLog b/ChangeLog index 73d23caf5..542a8c611 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2012-02-27 Vladimir Serbinenko + + * grub-core/efiemu/prepare.c (grub_efiemu_crc): Add missing + zeroing of CRC field before computing CRC. + 2012-02-27 Vladimir Serbinenko * grub-core/lib/relocator.c (malloc_in_range): Fix memory leak. diff --git a/grub-core/efiemu/prepare.c b/grub-core/efiemu/prepare.c index 5c3146490..2aef8634d 100644 --- a/grub-core/efiemu/prepare.c +++ b/grub-core/efiemu/prepare.c @@ -133,6 +133,7 @@ SUFFIX (grub_efiemu_crc) (void) runtime_services = (struct SUFFIX (grub_efiemu_runtime_services) *) ((grub_uint8_t *) grub_efiemu_mm_obtain_request (handle) + off); + runtime_services->hdr.crc32 = 0; GRUB_MD_CRC32->init(crc32_context); GRUB_MD_CRC32->write(crc32_context, runtime_services, runtime_services->hdr.header_size); GRUB_MD_CRC32->final(crc32_context); @@ -145,6 +146,7 @@ SUFFIX (grub_efiemu_crc) (void) return err; /* compute CRC32 of system table */ + SUFFIX (grub_efiemu_system_table)->hdr.crc32 = 0; GRUB_MD_CRC32->init(crc32_context); GRUB_MD_CRC32->write(crc32_context, SUFFIX (grub_efiemu_system_table), SUFFIX (grub_efiemu_system_table)->hdr.header_size);