https://git.reactos.org/?p=reactos.git;a=commitdiff;h=6969e85b29ebc1bfcf289…
commit 6969e85b29ebc1bfcf289de83cd238eb4ff9229c
Author: Mark Jansen <mark.jansen(a)reactos.org>
AuthorDate: Thu Jan 3 22:17:01 2019 +0100
Commit: Mark Jansen <mark.jansen(a)reactos.org>
CommitDate: Sat Jan 5 13:11:35 2019 +0100
[SHIMENG] Prevent a nullptr dereference
---
dll/appcompat/apphelp/shimeng.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/dll/appcompat/apphelp/shimeng.c b/dll/appcompat/apphelp/shimeng.c
index 0351ac399d..3520266133 100644
--- a/dll/appcompat/apphelp/shimeng.c
+++ b/dll/appcompat/apphelp/shimeng.c
@@ -1,8 +1,8 @@
/*
* PROJECT: ReactOS Application compatibility module
- * LICENSE: GPL-2.0+ (
https://spdx.org/licenses/GPL-2.0+)
+ * LICENSE: GPL-2.0-or-later (
https://spdx.org/licenses/GPL-2.0-or-later)
* PURPOSE: Shim engine core
- * COPYRIGHT: Copyright 2015-2018 Mark Jansen (mark.jansen(a)reactos.org)
+ * COPYRIGHT: Copyright 2015-2019 Mark Jansen (mark.jansen(a)reactos.org)
*/
#define WIN32_NO_STATUS
@@ -585,7 +585,8 @@ VOID SeiAddHooks(PHOOKAPIEX hooks, DWORD dwHookCount, PSHIMINFO
pShim)
}
}
pHookApi = ARRAY_Append(&HookModuleInfo->HookApis, PHOOKAPIEX);
- *pHookApi = hook;
+ if (pHookApi)
+ *pHookApi = hook;
}
}