FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Update inject/src/LoadLibraryR.c · a10ncoder/ReflectiveDLLInjection@c8f88d9 · GitHub

Repository navigation

Commit c8f88d9

Browse files
committed
Update inject/src/LoadLibraryR.c
Casting a 64bit pointer to a 32bit value was probably a bad idea ;) Caught this silly bug while testing on Windows 8 and building with visual Studio 2012. After this patch everything works as expected.
1 parent 3cadc42 commit c8f88d9

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎inject/src/LoadLibraryR.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ HANDLE WINAPI LoadRemoteLibraryR( HANDLE hProcess, LPVOID lpBuffer, DWORD dwLeng
214214
break;
215215

216216
// add the offset to ReflectiveLoader() to the remote library address...
217-
lpReflectiveLoader = (LPTHREAD_START_ROUTINE)( (DWORD)lpRemoteLibraryBuffer + (DWORD)dwReflectiveLoaderOffset );
217+
lpReflectiveLoader = (LPTHREAD_START_ROUTINE)( (ULONG_PTR)lpRemoteLibraryBuffer + dwReflectiveLoaderOffset );
218218

219219
// create a remote thread in the host process to call the ReflectiveLoader!
220220
hThread = CreateRemoteThread( hProcess, NULL, 1024*1024, lpReflectiveLoader, lpParameter, (DWORD)NULL, &dwThreadId );

0 commit comments

Comments
 (0)

Back | FazBrowse Home | New Git URL