11 Jan
2008
11 Jan
'08
6:36 a.m.
Alexandre Julliard wrote:
Andrey Turkin <andrey.turkin(a)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.
Oh, yes. I need more coffee :) And I should have been test native - native doesn't even bother to search section unless it is file mapping (MSDN is at least not complete, as usual). I'll send new version shortly.