diff options
author | Jose Fonseca <jfonseca@vmware.com> | 2015-10-31 22:38:20 +0000 |
---|---|---|
committer | Jose Fonseca <jfonseca@vmware.com> | 2015-10-31 22:38:44 +0000 |
commit | 4554d832a7bdae8952b73b5975a391b7ef20ac6e (patch) | |
tree | 3a15c0ef7e5619478ef409335d143366dd7077fe /inject | |
parent | 974a1f2de27dfe9821fc399dbab73bea2e4d07d9 (diff) |
inject: Prevent infinite recursion with Steam game overlay DLL.
Even if the Steam overlay is disabled, it seems that the DLL is still
injected, which is sufficient to cause the problems.
Diffstat (limited to 'inject')
-rw-r--r-- | inject/injectee.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/inject/injectee.cpp b/inject/injectee.cpp index 5a60c811..81d7af35 100644 --- a/inject/injectee.cpp +++ b/inject/injectee.cpp @@ -658,9 +658,17 @@ patchModule(HMODULE hModule, return; } - /* Leave these modules alone */ + /* Leave these modules alone. + * + * Hooking other injection DLLs easily leads to infinite recursion (and + * stack overflow), especially when those libraries use techniques like + * modifying the hooked functions prolog (instead of patching IAT like we + * do). + */ if (stricmp(szBaseName, "kernel32.dll") == 0 || - stricmp(szBaseName, "ConEmuHk.dll") == 0) { + stricmp(szBaseName, "ConEmuHk.dll") == 0 || + stricmp(szBaseName, "gameoverlayrenderer.dll") == 0 || + stricmp(szBaseName, "gameoverlayrenderer64.dll") == 0) { return; } |