https://git.reactos.org/?p=reactos.git;a=commitdiff;h=5f52a61e7dfdb821cc79c…
commit 5f52a61e7dfdb821cc79c7daf4c357fd6199eab9
Author: Mark Jansen <mark.jansen(a)reactos.org>
AuthorDate: Thu Feb 22 23:25:34 2018 +0100
Commit: Mark Jansen <mark.jansen(a)reactos.org>
CommitDate: Thu Feb 22 23:25:57 2018 +0100
[SHIMENG] Do not crash on a NULL ModuleName & BaseAddress.
CORE-14376
---
dll/appcompat/apphelp/shimeng.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/dll/appcompat/apphelp/shimeng.c b/dll/appcompat/apphelp/shimeng.c
index e03a57389a..3b0e7d0866 100644
--- a/dll/appcompat/apphelp/shimeng.c
+++ b/dll/appcompat/apphelp/shimeng.c
@@ -315,6 +315,11 @@ PHOOKMODULEINFO SeiFindHookModuleInfo(PUNICODE_STRING ModuleName,
PVOID BaseAddr
{
DWORD n;
+ if (ModuleName == NULL && BaseAddress == NULL)
+ {
+ BaseAddress = NtCurrentPeb()->ImageBaseAddress;
+ }
+
for (n = 0; n < ARRAY_Size(&g_pHookArray); ++n)
{
PHOOKMODULEINFO pModuleInfo = ARRAY_At(&g_pHookArray, HOOKMODULEINFO, n);