* grub-core/kern/dl.c (grub_dl_resolve_symbols): Handle malloc failure.
This commit is contained in:
parent
8528c879e3
commit
cdeb832472
2 changed files with 6 additions and 0 deletions
|
@ -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>
|
2013-04-24 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
Move mips-arc link address. Previous link address was chosen
|
Move mips-arc link address. Previous link address was chosen
|
||||||
|
|
|
@ -359,6 +359,8 @@ grub_dl_resolve_symbols (grub_dl_t mod, Elf_Ehdr *e)
|
||||||
|
|
||||||
#ifdef GRUB_MODULES_MACHINE_READONLY
|
#ifdef GRUB_MODULES_MACHINE_READONLY
|
||||||
mod->symtab = grub_malloc (s->sh_size);
|
mod->symtab = grub_malloc (s->sh_size);
|
||||||
|
if (!mod->symtab)
|
||||||
|
return grub_errno;
|
||||||
memcpy (mod->symtab, (char *) e + s->sh_offset, s->sh_size);
|
memcpy (mod->symtab, (char *) e + s->sh_offset, s->sh_size);
|
||||||
#else
|
#else
|
||||||
mod->symtab = (Elf_Sym *) ((char *) e + s->sh_offset);
|
mod->symtab = (Elf_Sym *) ((char *) e + s->sh_offset);
|
||||||
|
|
Loading…
Reference in a new issue