projects
/
reactos.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
0ebeced
)
[SHIMENG] Don't crash on a shim not found
author
Mark Jansen
<mark.jansen@reactos.org>
Mon, 11 Mar 2019 21:47:22 +0000
(22:47 +0100)
committer
Mark Jansen
<mark.jansen@reactos.org>
Thu, 14 Mar 2019 19:02:01 +0000
(20:02 +0100)
CORE-15846
dll/appcompat/apphelp/shimeng.c
patch
|
blob
|
history
diff --git
a/dll/appcompat/apphelp/shimeng.c
b/dll/appcompat/apphelp/shimeng.c
index
3520266
..
d1ba71d
100644
(file)
--- a/
dll/appcompat/apphelp/shimeng.c
+++ b/
dll/appcompat/apphelp/shimeng.c
@@
-1142,10
+1142,13
@@
VOID SeiInit(PUNICODE_STRING ProcessImage, HSDB hsdb, SDBQUERYRESULT* pQuery)
SHIMENG_INFO("Using SHIM \"%S!%S\"\n", DllName, ShimName);
/* Ask this shim what hooks it needs (and pass along the commandline) */
SHIMENG_INFO("Using SHIM \"%S!%S\"\n", DllName, ShimName);
/* Ask this shim what hooks it needs (and pass along the commandline) */
+ dwHookCount = 0;
pHookApi = pShimModuleInfo->pGetHookAPIs(AnsiCommandLine.Buffer, ShimName, &dwHookCount);
SHIMENG_INFO("GetHookAPIs returns %d hooks for DLL \"%wZ\" SHIM \"%S\"\n", dwHookCount, &UnicodeDllName, ShimName);
pHookApi = pShimModuleInfo->pGetHookAPIs(AnsiCommandLine.Buffer, ShimName, &dwHookCount);
SHIMENG_INFO("GetHookAPIs returns %d hooks for DLL \"%wZ\" SHIM \"%S\"\n", dwHookCount, &UnicodeDllName, ShimName);
- if (dwHookCount)
+ if (dwHookCount
&& pHookApi
)
pShimInfo = SeiAppendHookInfo(pShimModuleInfo, pHookApi, dwHookCount, ShimName);
pShimInfo = SeiAppendHookInfo(pShimModuleInfo, pHookApi, dwHookCount, ShimName);
+ else
+ dwHookCount = 0;
/* If this shim has hooks, create the include / exclude lists */
if (pShimInfo)
/* If this shim has hooks, create the include / exclude lists */
if (pShimInfo)