From 47dcf7b1762ec72c9b945968b7abfd1488b9b559 Mon Sep 17 00:00:00 2001 From: Vladimir Serbinenko Date: Fri, 8 Nov 2013 04:59:46 +0100 Subject: [PATCH] * grub-core/loader/multiboot_mbi2.c (grub_multiboot_add_module): Fix NULL pointer dereference. --- ChangeLog | 5 +++++ grub-core/loader/multiboot_mbi2.c | 5 +---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 4a19338f2..16a2c7fbc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2013-11-08 Vladimir Serbinenko + + * grub-core/loader/multiboot_mbi2.c (grub_multiboot_add_module): Fix + NULL pointer dereference. + 2013-11-07 Vladimir Serbinenko * grub-core/Makefile.am: Do not include libgcc.h when compiling with diff --git a/grub-core/loader/multiboot_mbi2.c b/grub-core/loader/multiboot_mbi2.c index 6a6be77e2..cdbeef92c 100644 --- a/grub-core/loader/multiboot_mbi2.c +++ b/grub-core/loader/multiboot_mbi2.c @@ -978,10 +978,7 @@ grub_multiboot_add_module (grub_addr_t start, grub_size_t size, if (modules_last) modules_last->next = newmod; else - { - modules = newmod; - modules_last->next = NULL; - } + modules = newmod; modules_last = newmod; modcnt++;