Commit cbf9d1b0 authored by Alexandre Julliard's avatar Alexandre Julliard

rpcrt4: Add checks for the number of methods being larger than what we support.

parent 066060a5
......@@ -133,6 +133,11 @@ static BOOL fill_stubless_table( IUnknownVtbl *vtbl, DWORD num )
const void **entry = (const void **)(vtbl + 1);
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++)
{
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);
DWORD i, j;
if (num - 3 > BLOCK_SIZE * MAX_BLOCKS)
{
FIXME( "%u methods not supported\n", num );
return FALSE;
}
vtbl->QueryInterface = delegating_QueryInterface;
vtbl->AddRef = delegating_AddRef;
vtbl->Release = delegating_Release;
......@@ -218,6 +223,11 @@ BOOL fill_delegated_proxy_table(IUnknownVtbl *vtbl, DWORD num)
const void **entry = (const void **)(vtbl + 1);
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->AddRef = IUnknown_AddRef_Proxy;
vtbl->Release = IUnknown_Release_Proxy;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment