mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-11-27 12:03:41 +08:00
Fix: Null pointer dereference in elf32-i386.c
PR 30950 * elf32-i386.c (elf_i386_convert_load_reloc): Check for elf_x86_hash_table returning a NULL pointer.
This commit is contained in:
parent
e7c3fa04b6
commit
cb0f1baf44
@ -1,5 +1,9 @@
|
||||
2023-10-09 Nick Clifton <nickc@redhat.com>
|
||||
|
||||
PR 30950
|
||||
* elf32-i386.c (elf_i386_convert_load_reloc): Check for
|
||||
elf_x86_hash_table returning a NULL pointer.
|
||||
|
||||
PR 30949
|
||||
* elflink.c (elf_gc_mark_debug_section): Check for
|
||||
bfd_section_from_elf_index returning a NULL pointer.
|
||||
|
@ -1241,6 +1241,12 @@ elf_i386_convert_load_reloc (bfd *abfd, Elf_Internal_Shdr *symtab_hdr,
|
||||
return true;
|
||||
|
||||
htab = elf_x86_hash_table (link_info, I386_ELF_DATA);
|
||||
if (htab == NULL || ! is_x86_elf (abfd, htab))
|
||||
{
|
||||
bfd_set_error (bfd_error_wrong_format);
|
||||
return false;
|
||||
}
|
||||
|
||||
is_pic = bfd_link_pic (link_info);
|
||||
|
||||
r_type = *r_type_p;
|
||||
|
Loading…
Reference in New Issue
Block a user