We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 61a80f4 + 252e628 commit f35b311Copy full SHA for f35b311
MemoryModule/MemoryModule.cpp
@@ -285,7 +285,7 @@ NTSTATUS MemoryLoadLibrary(
285
PIMAGE_BASE_RELOCATION_HEADER relocation = (PIMAGE_BASE_RELOCATION_HEADER)(LPBYTE(base) + dir->VirtualAddress);
286
287
if (dir->Size && dir->VirtualAddress) {
288
- while (relocation->VirtualAddress > 0) {
+ while ((LPBYTE(relocation) < LPBYTE(base) + dir->VirtualAddress + dir->Size) && relocation->VirtualAddress > 0) {
289
auto relInfo = (_REBASE_INFO*)&relocation->TypeOffset;
290
for (DWORD i = 0; i < relocation->TypeOffsetCount(); ++i, ++relInfo) {
291
switch (relInfo->Type) {
0 commit comments