View | Details | Raw Unified | Return to bug 17531 | Differences between
and this patch

Collapse All | Expand All

(-)a/binutils/readelf.c (-1 / +6 lines)
Lines 4760-4765 get_32bit_elf_symbols (FILE * file, Link Here
4760
                                                   _("symbol table section indicies"));
4760
                                                   _("symbol table section indicies"));
4761
      if (shndx == NULL)
4761
      if (shndx == NULL)
4762
	goto exit_point;
4762
	goto exit_point;
4763
      /* PR17531: file: heap-buffer-overflow */
4764
      else if (symtab_shndx_hdr->sh_size / sizeof(Elf_External_Sym_Shndx) < number)
4765
	{
4766
	  error (_("Invalid sh_size\n"));
4767
	  goto exit_point;
4768
	}
4763
    }
4769
    }
4764
4770
4765
  isyms = (Elf_Internal_Sym *) cmalloc (number, sizeof (Elf_Internal_Sym));
4771
  isyms = (Elf_Internal_Sym *) cmalloc (number, sizeof (Elf_Internal_Sym));
4766
- 

Return to bug 17531