mirror of
https://github.com/vxcontrol/MemoryModule.git
synced 2026-07-20 21:59:45 -04:00
Merge pull request #24 from Fr0sT-Brutal/patch-1
Zero the memory allocated in the heap
This commit is contained in:
+1
-4
@@ -496,7 +496,7 @@ HMEMORYMODULE MemoryLoadLibraryEx(const void *data,
|
||||
}
|
||||
}
|
||||
|
||||
result = (PMEMORYMODULE)HeapAlloc(GetProcessHeap(), 0, sizeof(MEMORYMODULE));
|
||||
result = (PMEMORYMODULE)HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(MEMORYMODULE));
|
||||
if (result == NULL) {
|
||||
SetLastError(ERROR_OUTOFMEMORY);
|
||||
VirtualFree(code, 0, MEM_RELEASE);
|
||||
@@ -504,9 +504,6 @@ HMEMORYMODULE MemoryLoadLibraryEx(const void *data,
|
||||
}
|
||||
|
||||
result->codeBase = code;
|
||||
result->numModules = 0;
|
||||
result->modules = NULL;
|
||||
result->initialized = FALSE;
|
||||
result->isDLL = (old_header->FileHeader.Characteristics & IMAGE_FILE_DLL) != 0;
|
||||
result->loadLibrary = loadLibrary;
|
||||
result->getProcAddress = getProcAddress;
|
||||
|
||||
Reference in New Issue
Block a user