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

Collapse All | Expand All

(-)a/bfd/peXXigen.c (-5 / +6 lines)
Lines 1661-1667 pe_print_edata (bfd * abfd, void * vfile) Link Here
1661
1661
1662
      dataoff = addr - section->vma;
1662
      dataoff = addr - section->vma;
1663
      datasize = extra->DataDirectory[PE_EXPORT_TABLE].Size;
1663
      datasize = extra->DataDirectory[PE_EXPORT_TABLE].Size;
1664
      if (datasize > section->size - dataoff)
1664
      if (dataoff > section->size
1665
	  || datasize > section->size - dataoff)
1665
	{
1666
	{
1666
	  fprintf (file,
1667
	  fprintf (file,
1667
		   _("\nThere is an export table in %s, but it does not fit into that section\n"),
1668
		   _("\nThere is an export table in %s, but it does not fit into that section\n"),
Lines 1778-1788 pe_print_edata (bfd * abfd, void * vfile) Link Here
1778
	  edt.base);
1779
	  edt.base);
1779
1780
1780
  /* PR 17512: Handle corrupt PE binaries.  */
1781
  /* PR 17512: Handle corrupt PE binaries.  */
1781
  if (edt.eat_addr + (edt.num_functions * 4) - adj >= datasize
1782
  /* PR 17512 file: 140-165018-0.004.  */
1783
  if (edt.eat_addr - adj >= datasize
1782
      /* PR 17512: file: 092b1829 */
1784
      /* PR 17512: file: 092b1829 */
1783
      || (edt.num_functions * 4) < edt.num_functions
1785
      || (edt.num_functions + 1) * 4 < edt.num_functions
1784
      /* PR 17512 file: 140-165018-0.004.  */
1786
      || edt.eat_addr - adj + (edt.num_functions + 1) * 4 > datasize)
1785
      || data + edt.eat_addr - adj < data)
1786
    fprintf (file, _("\tInvalid Export Address Table rva (0x%lx) or entry count (0x%lx)\n"),
1787
    fprintf (file, _("\tInvalid Export Address Table rva (0x%lx) or entry count (0x%lx)\n"),
1787
	     (long) edt.eat_addr,
1788
	     (long) edt.eat_addr,
1788
	     (long) edt.num_functions);
1789
	     (long) edt.num_functions);

Return to bug 23685