More fixes for memory access violations exposed by fuzzed binaries.
[deliverable/binutils-gdb.git] / bfd / mach-o.c
index 61d60db54a2a6d93b3ff4b78ea681193b0dab064..9928f42394f9cd98f6b9aafa069a4cfabe3d95ca 100644 (file)
@@ -1352,6 +1352,8 @@ bfd_mach_o_canonicalize_one_reloc (bfd *abfd,
          /* PR 17512: file: 8396-1185-0.004.  */
          if (bfd_get_symcount (abfd) > 0 && num > bfd_get_symcount (abfd))
            sym = bfd_und_section_ptr->symbol_ptr_ptr;
+         else if (syms == NULL)
+           sym = bfd_und_section_ptr->symbol_ptr_ptr;      
          else
            /* An external symbol number.  */
            sym = syms + num;
This page took 0.023835 seconds and 4 git commands to generate.