grub/grub-core/loader/i386/pc
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
..
chainloader.c Improve gettext support. Stylistic fixes and error handling fixes while 2012-02-08 19:26:01 +01:00
freedos.c Mark few forgotten strings for translation. 2013-05-07 11:41:47 +02: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
ntldr.c Improve gettext support. Stylistic fixes and error handling fixes while 2012-02-08 19:26:01 +01:00
plan9.c * include/grub/mm.h (grub_extend_alloc): Remove. 2013-08-22 16:44:20 +02:00
pxechainloader.c Terminate UNDI and PXE before launching the payload to avoid problems 2012-04-11 22:32:31 +02:00
truecrypt.c Implement Truecrypt ISO loader. 2013-12-17 14:45:46 +01:00