mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-10-19 05:42:42 +08:00
Return NULL on corrupt input
PR binutils/17512 * elf32-i386.c (elf_i386_get_plt_sym_val): Return NULL on corrupt input. * elf64-x86-64.c (elf_x86_64_get_plt_sym_val): Likewise.
This commit is contained in:
@ -1,3 +1,10 @@
|
|||||||
|
2015-01-05 H.J. Lu <hongjiu.lu@intel.com>
|
||||||
|
|
||||||
|
PR binutils/17512
|
||||||
|
* elf32-i386.c (elf_i386_get_plt_sym_val): Return NULL on corrupt
|
||||||
|
input.
|
||||||
|
* elf64-x86-64.c (elf_x86_64_get_plt_sym_val): Likewise.
|
||||||
|
|
||||||
2015-01-05 Nick Clifton <nickc@redhat.com>
|
2015-01-05 Nick Clifton <nickc@redhat.com>
|
||||||
|
|
||||||
PR binutils/17512
|
PR binutils/17512
|
||||||
|
@ -5194,9 +5194,12 @@ bad_return:
|
|||||||
{
|
{
|
||||||
long reloc_index;
|
long reloc_index;
|
||||||
|
|
||||||
if (p->howto == NULL /* PR 17512: file: bc9d6cf5. */
|
/* PR 17512: file: bc9d6cf5. */
|
||||||
|| (p->howto->type != R_386_JUMP_SLOT
|
if (p->howto == NULL)
|
||||||
&& p->howto->type != R_386_IRELATIVE))
|
goto bad_return;
|
||||||
|
|
||||||
|
if (p->howto->type != R_386_JUMP_SLOT
|
||||||
|
&& p->howto->type != R_386_IRELATIVE)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
reloc_index = H_GET_32 (abfd, (plt_contents + plt_offset
|
reloc_index = H_GET_32 (abfd, (plt_contents + plt_offset
|
||||||
|
@ -5559,6 +5559,9 @@ bad_return:
|
|||||||
{
|
{
|
||||||
long reloc_index;
|
long reloc_index;
|
||||||
|
|
||||||
|
if (p->howto == NULL)
|
||||||
|
goto bad_return;
|
||||||
|
|
||||||
if (p->howto->type != R_X86_64_JUMP_SLOT
|
if (p->howto->type != R_X86_64_JUMP_SLOT
|
||||||
&& p->howto->type != R_X86_64_IRELATIVE)
|
&& p->howto->type != R_X86_64_IRELATIVE)
|
||||||
continue;
|
continue;
|
||||||
|
Reference in New Issue
Block a user