Index: lib/rtl/image.c =================================================================== --- lib/rtl/image.c (revision 69855) +++ lib/rtl/image.c (working copy) @@ -318,7 +318,7 @@ { PIMAGE_SECTION_HEADER Section; ULONG Va; - ULONG Count; + ULONG Count, Limit; Count = SWAPW(NtHeader->FileHeader.NumberOfSections); Section = IMAGE_FIRST_SECTION(NtHeader); @@ -326,9 +326,15 @@ while (Count--) { Va = SWAPD(Section->VirtualAddress); - if ((Va <= Rva) && - (Rva < Va + SWAPD(Section->Misc.VirtualSize))) + + Limit = SWAPD(Section->SizeOfRawData); + if (!Limit) + Limit = SWAPD(Section->Misc.VirtualSize); + + if (Rva >= Va && + Rva < (Va + Limit)) return Section; + Section++; } return NULL;