1 --- binutils.orig/bfd/pei-x86_64.c 2019-02-25 16:12:29.798061414 +0000
2 +++ binutils-2.31.1/bfd/pei-x86_64.c 2019-02-25 17:09:02.783425236 +0000
3 @@ -541,7 +541,7 @@ pex64_bfd_print_pdata_section (bfd *abfd
4 /* virt_size might be zero for objects. */
5 if (stop == 0 && strcmp (abfd->xvec->name, "pe-x86-64") == 0)
7 - stop = (datasize / onaline) * onaline;
9 virt_size_is_zero = TRUE;
11 else if (datasize < stop)
12 @@ -551,8 +551,8 @@ pex64_bfd_print_pdata_section (bfd *abfd
13 _("Warning: %s section size (%ld) is smaller than virtual size (%ld)\n"),
14 pdata_section->name, (unsigned long) datasize,
15 (unsigned long) stop);
16 - /* Be sure not to read passed datasize. */
17 - stop = datasize / onaline;
18 + /* Be sure not to read past datasize. */
22 /* Display functions table. */
23 @@ -724,8 +724,7 @@ pex64_bfd_print_pdata_section (bfd *abfd
26 if (altent >= pdata_vma
27 - && (altent + PDATA_ROW_SIZE <= pdata_vma
28 - + pei_section_data (abfd, pdata_section)->virt_size))
29 + && altent - pdata_vma + PDATA_ROW_SIZE <= stop)
31 pex64_get_runtime_function
32 (abfd, &arf, &pdata[altent - pdata_vma]);