iterate the number of sections, not the number of directory entries

svn path=/trunk/; revision=33611
This commit is contained in:
Ged Murphy 2008-05-20 14:20:54 +00:00
parent 0b0ec52a01
commit 45a63ea020

View file

@ -201,7 +201,7 @@ void *rva_to_ptr(DWORD rva)
unsigned int i;
for (i = 0, section_header = IMAGE_FIRST_SECTION(nt_header);
i < dtohl(nt_header->OptionalHeader.NumberOfRvaAndSizes);
i < dtohl(nt_header->FileHeader.NumberOfSections);
i++, section_header++)
{
if (rva >= dtohl(section_header->VirtualAddress) &&