rpcrt4: Add checks for the number of methods being larger than what we support.
This commit is contained in:
parent
066060a520
commit
cbf9d1b0c6
|
@ -133,6 +133,11 @@ static BOOL fill_stubless_table( IUnknownVtbl *vtbl, DWORD num )
|
||||||
const void **entry = (const void **)(vtbl + 1);
|
const void **entry = (const void **)(vtbl + 1);
|
||||||
DWORD i, j;
|
DWORD i, j;
|
||||||
|
|
||||||
|
if (num - 3 > BLOCK_SIZE * MAX_BLOCKS)
|
||||||
|
{
|
||||||
|
FIXME( "%u methods not supported\n", num );
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
for (i = 0; i < (num - 3 + BLOCK_SIZE - 1) / BLOCK_SIZE; i++)
|
for (i = 0; i < (num - 3 + BLOCK_SIZE - 1) / BLOCK_SIZE; i++)
|
||||||
{
|
{
|
||||||
const struct thunk *block = method_blocks[i];
|
const struct thunk *block = method_blocks[i];
|
||||||
|
|
|
@ -201,6 +201,11 @@ static BOOL fill_delegated_stub_table(IUnknownVtbl *vtbl, DWORD num)
|
||||||
const void **entry = (const void **)(vtbl + 1);
|
const void **entry = (const void **)(vtbl + 1);
|
||||||
DWORD i, j;
|
DWORD i, j;
|
||||||
|
|
||||||
|
if (num - 3 > BLOCK_SIZE * MAX_BLOCKS)
|
||||||
|
{
|
||||||
|
FIXME( "%u methods not supported\n", num );
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
vtbl->QueryInterface = delegating_QueryInterface;
|
vtbl->QueryInterface = delegating_QueryInterface;
|
||||||
vtbl->AddRef = delegating_AddRef;
|
vtbl->AddRef = delegating_AddRef;
|
||||||
vtbl->Release = delegating_Release;
|
vtbl->Release = delegating_Release;
|
||||||
|
@ -218,6 +223,11 @@ BOOL fill_delegated_proxy_table(IUnknownVtbl *vtbl, DWORD num)
|
||||||
const void **entry = (const void **)(vtbl + 1);
|
const void **entry = (const void **)(vtbl + 1);
|
||||||
DWORD i, j;
|
DWORD i, j;
|
||||||
|
|
||||||
|
if (num - 3 > BLOCK_SIZE * MAX_BLOCKS)
|
||||||
|
{
|
||||||
|
FIXME( "%u methods not supported\n", num );
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
vtbl->QueryInterface = IUnknown_QueryInterface_Proxy;
|
vtbl->QueryInterface = IUnknown_QueryInterface_Proxy;
|
||||||
vtbl->AddRef = IUnknown_AddRef_Proxy;
|
vtbl->AddRef = IUnknown_AddRef_Proxy;
|
||||||
vtbl->Release = IUnknown_Release_Proxy;
|
vtbl->Release = IUnknown_Release_Proxy;
|
||||||
|
|
Loading…
Reference in New Issue