diff options
author | Jose Fonseca <jfonseca@vmware.com> | 2015-07-10 10:51:20 +0100 |
---|---|---|
committer | Jose Fonseca <jfonseca@vmware.com> | 2015-07-10 10:51:20 +0100 |
commit | 46584eaae13051a5d1b3bc3f49f9b38d423a1e86 (patch) | |
tree | 92300f81bb4cf67ce1ad357796a7355b5aea27df /inject | |
parent | 3a6e9c7fb0e42bd78650cfee496674de4d0373ae (diff) |
inject: Less invasive workaround for failed assertion.
Diffstat (limited to 'inject')
-rw-r--r-- | inject/injectee.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/inject/injectee.cpp b/inject/injectee.cpp index e31df595..4ed8488d 100644 --- a/inject/injectee.cpp +++ b/inject/injectee.cpp @@ -610,8 +610,11 @@ patchDescriptor(HMODULE hModule, LPVOID lpRealAddress = NULL; HMODULE hRealModule = GetModuleHandleA(szDescriptorName); if (hRealModule) { - assert(hRealModule != g_hHookModule); - lpRealAddress = (LPVOID)GetProcAddress(hRealModule, szFunctionName); + // FIXME: this assertion can fail when the wrapper name is the same as the original DLL + //assert(hRealModule != g_hHookModule); + if (hRealModule != g_hHookModule) { + lpRealAddress = (LPVOID)GetProcAddress(hRealModule, szFunctionName); + } } LPVOID lpOldAddress = lpRealAddress; |