* grub-core/kern/dl.c (grub_dl_resolve_symbols): Handle malloc failure.

This commit is contained in:
Vladimir 'phcoder' Serbinenko committed 2013-04-24 13:58:31 +02:00
1 parent 8528c879e3
commit cdeb832472
2 files changed
+6

No files matched your search

+4
View File
@@ -1,3 +1,7 @@
2013-04-24 Vladimir Serbinenko <phcoder@gmail.com>
* grub-core/kern/dl.c (grub_dl_resolve_symbols): Handle malloc failure.
2013-04-24 Vladimir Serbinenko <phcoder@gmail.com>
Move mips-arc link address. Previous link address was chosen
+2
View File
@@ -359,6 +359,8 @@ grub_dl_resolve_symbols (grub_dl_t mod, Elf_Ehdr *e)
#ifdef GRUB_MODULES_MACHINE_READONLY
mod->symtab = grub_malloc (s->sh_size);
if (!mod->symtab)
return grub_errno;
memcpy (mod->symtab, (char *) e + s->sh_offset, s->sh_size);
#else
mod->symtab = (Elf_Sym *) ((char *) e + s->sh_offset);