PR24339, segfault on NULL symbol section
[deliverable/binutils-gdb.git] / bfd / elflink.c
index 2600c3934b12652741afca3cfafde61f09b57be3..09990a438f6c7b13fea4da90778c4720665367bb 100644 (file)
@@ -4442,7 +4442,13 @@ error_free_dyn:
             global symbols follow all local symbols, and that sh_info
             point to the first global symbol.  Unfortunately, Irix 5
             screws this up.  */
-         continue;
+         if (elf_bad_symtab (abfd))
+           continue;
+
+         /* If we aren't prepared to handle locals within the globals
+             then we'll likely segfault on a NULL section.  */
+         bfd_set_error (bfd_error_bad_value);
+         goto error_free_vers;
 
        case STB_GLOBAL:
          if (isym->st_shndx != SHN_UNDEF && !common)
This page took 0.025593 seconds and 4 git commands to generate.