Skip to contentSkip to conversation

grub-core/loader/i386/xen.c: Initialized initrd_ctx so we don't free a random pointer from the stack.

PATCH Applied Sarah Newman 2 participants 2 messages Mar 27, 2015 – Mar 28, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 grub-core/loader/i386/xen.c: Initialized initrd_ctx so we don't free a random pointer from the stack.

---
 grub-core/loader/i386/xen.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
grub-core/loader/i386/xen.c +1 -1
index c16b4b2..c4d9689 100644
@@ -521,7 +521,7 @@ grub_cmd_initrd (grub_command_t cmd __attribute__ ((unused)),
 {
   grub_size_t size = 0;
   grub_err_t err;
-  struct grub_linux_initrd_context initrd_ctx;
+  struct grub_linux_initrd_context initrd_ctx = { 0, 0, 0 };
   grub_relocator_chunk_t ch;
 
   if (argc == 0)
Signature · 1 line
1.9.1
#1 lore raw

В Fri, 27 Mar 2015 12:56:43 -0700
Sarah Newman <[email protected]> пишет:

Quoted 10 lines
---
 grub-core/loader/i386/xen.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
grub-core/loader/i386/xen.c +0 -0
index c16b4b2..c4d9689 100644

grub-core/loader/i386/xen.c grub_cmd_initrd (grub_command_t cmd __attribute__ ((unused)), · line 527

Quoted 8 lines
grub-core/loader/i386/xen.c +1 -1
@@ -521,7 +521,7 @@ grub_cmd_initrd (grub_command_t cmd __attribute__ ((unused)),
 {
   grub_size_t size = 0;
   grub_err_t err;
-  struct grub_linux_initrd_context initrd_ctx;
+  struct grub_linux_initrd_context initrd_ctx = { 0, 0, 0 };
   grub_relocator_chunk_t ch;
 
   if (argc == 0)

Applied. Thanks!