]> git.pld-linux.org Git - packages/binutils.git/blob - binutils-CVE-2019-9074.patch
84f0fd501d89cd8c20d5178fce0d3e6aea3c378b
[packages/binutils.git] / binutils-CVE-2019-9074.patch
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)
6      {
7 -      stop = (datasize / onaline) * onaline;
8 +      stop = datasize;
9        virt_size_is_zero = TRUE;
10      }
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.  */
19 +       stop = datasize;
20        }
21  
22    /* Display functions table.  */
23 @@ -724,8 +724,7 @@ pex64_bfd_print_pdata_section (bfd *abfd
24               altent += imagebase;
25  
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)
30                 {
31                   pex64_get_runtime_function
32                     (abfd, &arf, &pdata[altent - pdata_vma]);
This page took 0.019425 seconds and 2 git commands to generate.