grub/grub-core/loader/i386
Peter Jones 631a820038 Initialized initrd_ctx so we don't free a random pointer from the stack.
Currently, if "linux" fails, the "goto fail;" in grub_cmd_initrd sends us
into grub_initrd_close() without grub_initrd_init() being called, and thus
it never clears initrd_ctx->components.  grub_initrd_close() then frees that
address, which is stale data from the stack.  If the stack happens to have a
stale *address* there that matches a recent allocation, then you'll get a
double free later.

So initialize the memory up front.

Signed-off-by: Peter Jones <pjones@redhat.com>
2014-09-21 10:36:42 +04:00
..
coreboot * grub-core/loader/i386/coreboot/chainloader.c (load_segment): Use 2013-11-11 00:06:52 +01:00
pc Initialized initrd_ctx so we don't free a random pointer from the stack. 2014-09-21 10:36:42 +04:00
bsd.c * grub-core/loader/i386/bsd.c (grub_netbsd_boot): Pass pointer to 2014-06-22 01:35:52 +02:00
bsd32.c automake commit without merge history 2010-05-06 11:34:04 +05:30
bsd64.c automake commit without merge history 2010-05-06 11:34:04 +05:30
bsd_pagetable.c * grub-core/commands/legacycfg.c (grub_cmd_legacy_kernel): 2010-10-16 22:16:52 +02:00
bsdXX.c * grub-core/loader/i386/bsdXX.c (grub_openbsd_find_ramdisk): Use 2013-03-10 20:37:41 +01:00
linux.c Initialized initrd_ctx so we don't free a random pointer from the stack. 2014-09-21 10:36:42 +04:00
multiboot_mbi.c * grub-core/loader/i386/multiboot_mbi.c (grub_multiboot_make_mbi): Limit 2014-02-28 09:48:57 +01:00
xen.c Remove xen VFB. 2013-12-18 18:43:09 +01:00
xen_file.c fix include loop on MinGW due to libintl.h pulling stdio.h 2014-01-18 21:22:57 +04:00
xen_file32.c Add new ports: i386-xen and x86_64-xen. This allows running GRUB in 2013-11-09 21:29:11 +01:00
xen_file64.c Add new ports: i386-xen and x86_64-xen. This allows running GRUB in 2013-11-09 21:29:11 +01:00
xen_fileXX.c fix include loop on MinGW due to libintl.h pulling stdio.h 2014-01-18 21:22:57 +04:00
xnu.c Propagate the EFI commits to x86-efi specific parts. 2013-12-11 16:11:17 +01:00