@@ -541,7 +541,7 @@ pex64_bfd_print_pdata_section (bfd *abfd, void *vfile, asection *pdata_section)
541
541
/* virt_size might be zero for objects. */
542
542
if (stop == 0 && strcmp (abfd -> xvec -> name , "pe-x86-64" ) == 0 )
543
543
{
544
- stop = ( datasize / onaline ) * onaline ;
544
+ stop = datasize ;
545
545
virt_size_is_zero = TRUE;
546
546
}
547
547
else if (datasize < stop )
@@ -551,8 +551,8 @@ pex64_bfd_print_pdata_section (bfd *abfd, void *vfile, asection *pdata_section)
551
551
_ ("Warning: %s section size (%ld) is smaller than virtual size (%ld)\n" ),
552
552
pdata_section -> name , (unsigned long ) datasize ,
553
553
(unsigned long ) stop );
554
- /* Be sure not to read passed datasize. */
555
- stop = datasize / onaline ;
554
+ /* Be sure not to read past datasize. */
555
+ stop = datasize ;
556
556
}
557
557
558
558
/* Display functions table. */
@@ -724,8 +724,7 @@ pex64_bfd_print_pdata_section (bfd *abfd, void *vfile, asection *pdata_section)
724
724
altent += imagebase ;
725
725
726
726
if (altent >= pdata_vma
727
- && (altent + PDATA_ROW_SIZE <= pdata_vma
728
- + pei_section_data (abfd , pdata_section )-> virt_size ))
727
+ && altent - pdata_vma + PDATA_ROW_SIZE <= stop )
729
728
{
730
729
pex64_get_runtime_function
731
730
(abfd , & arf , & pdata [altent - pdata_vma ]);
0 commit comments