Andrey Turkin andrey.turkin@gmail.com writes:
- if (image || addr < nt->OptionalHeader.SizeOfHeaders)
- {
if (section)
{
PIMAGE_SECTION_HEADER sec = IMAGE_FIRST_SECTION(nt);
WORD i;
for(i = 0; i < nt->FileHeader.NumberOfSections; i++, sec++)
{
if (addr >= sec->PointerToRawData && (addr - sec->PointerToRawData) < sec->SizeOfRawData)
{
It doesn't make sense to check an RVA against PointerToRawData.