mirror of
https://github.com/vxcontrol/MemoryModule.git
synced 2026-07-20 21:59:45 -04:00
Fixed copying too much into local headers.
Reported by Sea Caspian (j.sea.caspian [at] gmail.com)
This commit is contained in:
+1
-1
@@ -413,7 +413,7 @@ HMEMORYMODULE MemoryLoadLibraryEx(const void *data,
|
||||
PAGE_READWRITE);
|
||||
|
||||
// copy PE header to code
|
||||
memcpy(headers, dos_header, dos_header->e_lfanew + old_header->OptionalHeader.SizeOfHeaders);
|
||||
memcpy(headers, dos_header, old_header->OptionalHeader.SizeOfHeaders);
|
||||
result->headers = (PIMAGE_NT_HEADERS)&((const unsigned char *)(headers))[dos_header->e_lfanew];
|
||||
|
||||
// update position
|
||||
|
||||
Reference in New Issue
Block a user