Fix #25: out of bounds read in RpcCoreInit

This commit is contained in:
silverf0x
2019-01-15 21:13:03 +01:00
parent b98ed0702f
commit c92891ea03
+1 -1
View File
@@ -289,7 +289,7 @@ VOID* __fastcall RpcCoreInit(BOOL bForce)
if (GetSystemDirectoryW(RpcRuntimePath,_countof(RpcRuntimePath))==0) goto End;
StringCbPrintfW(RpcRuntimePath,sizeof(RpcRuntimePath),L"%s\\rpcrt4.dll",RpcRuntimePath);
RuntimVersion=GetModuleVersion(RpcRuntimePath);
for (i = 0; i < sizeof(RPC_CORE_RUNTIME_VERSION); i++)
for (i = 0; i < _countof(RPC_CORE_RUNTIME_VERSION); i++)
{
if (bForce && ((RuntimVersion & 0xFFFFFFFF00000000) == (RPC_CORE_RUNTIME_VERSION[i] & 0xFFFFFFFF00000000)))
{