From: Alex Henrie alexhenrie24@gmail.com
--- dlls/rpcrt4/ndr_fullpointer.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/dlls/rpcrt4/ndr_fullpointer.c b/dlls/rpcrt4/ndr_fullpointer.c index 39e1b18c828..89a692324ed 100644 --- a/dlls/rpcrt4/ndr_fullpointer.c +++ b/dlls/rpcrt4/ndr_fullpointer.c @@ -87,18 +87,14 @@ static void expand_pointer_table_if_necessary(PFULL_PTR_XLAT_TABLES pXlatTables, if (RefId >= pXlatTables->RefIdToPointer.NumberOfEntries) { pXlatTables->RefIdToPointer.XlatTable = - realloc(pXlatTables->RefIdToPointer.XlatTable, sizeof(void *) * RefId * 2); + _recalloc(pXlatTables->RefIdToPointer.XlatTable, RefId * 2, sizeof(void *)); pXlatTables->RefIdToPointer.StateTable = - realloc(pXlatTables->RefIdToPointer.StateTable, RefId * 2); + _recalloc(pXlatTables->RefIdToPointer.StateTable, RefId * 2, sizeof(unsigned char)); if (!pXlatTables->RefIdToPointer.XlatTable || !pXlatTables->RefIdToPointer.StateTable) { pXlatTables->RefIdToPointer.NumberOfEntries = 0; return; } - memset(pXlatTables->RefIdToPointer.XlatTable + pXlatTables->RefIdToPointer.NumberOfEntries, 0, - (RefId * 2 - pXlatTables->RefIdToPointer.NumberOfEntries) * sizeof(void *)); - memset(pXlatTables->RefIdToPointer.StateTable + pXlatTables->RefIdToPointer.NumberOfEntries, 0, - RefId * 2 - pXlatTables->RefIdToPointer.NumberOfEntries); pXlatTables->RefIdToPointer.NumberOfEntries = RefId * 2; } }