Fix an assertion failure when parsing a fuzzed x86_64 ELF binary.
[deliverable/binutils-gdb.git] / bfd / elf64-x86-64.c
index 84a26033245d096be366d68e959dbe37f4e7b181..4b19d0225988a7c5910d9a0f923b8932b3e07b07 100644 (file)
@@ -344,7 +344,8 @@ elf_x86_64_info_to_howto (bfd *abfd ATTRIBUTE_UNUSED, arelent *cache_ptr,
       && r_type != (unsigned int) R_X86_64_GNU_VTENTRY)
     r_type &= ~R_X86_64_converted_reloc_bit;
   cache_ptr->howto = elf_x86_64_rtype_to_howto (abfd, r_type);
-  BFD_ASSERT (r_type == cache_ptr->howto->type);
+
+  BFD_ASSERT (r_type == cache_ptr->howto->type || cache_ptr->howto->type == R_X86_64_NONE);
 }
 \f
 /* Support for core dump NOTE sections.  */
This page took 0.023519 seconds and 4 git commands to generate.