diff --git a/dll/win32/rpcrt4/ndr_fullpointer.c b/dll/win32/rpcrt4/ndr_fullpointer.c index 39e1b18c828..455c424cc3d 100644 --- a/dll/win32/rpcrt4/ndr_fullpointer.c +++ b/dll/win32/rpcrt4/ndr_fullpointer.c @@ -86,12 +86,41 @@ static void expand_pointer_table_if_necessary(PFULL_PTR_XLAT_TABLES pXlatTables, { if (RefId >= pXlatTables->RefIdToPointer.NumberOfEntries) { +#ifdef __REACTOS__ + void* ptrNew; + ptrNew = realloc(pXlatTables->RefIdToPointer.XlatTable, sizeof(void *) * RefId * 2); + if (!ptrNew) + { + ERR("Couldn't reallocate RefIdToPointer.XlatTable from %lu to %lu entries\n", + pXlatTables->RefIdToPointer.NumberOfEntries, RefId * 2); + free(pXlatTables->RefIdToPointer.XlatTable); + } + pXlatTables->RefIdToPointer.XlatTable = ptrNew; + if (ptrNew) + { + ptrNew = realloc(pXlatTables->RefIdToPointer.StateTable, RefId * 2); + if (!ptrNew) + { + ERR("Couldn't reallocate RefIdToPointer.StateTable from %lu to %lu entries\n", + pXlatTables->RefIdToPointer.NumberOfEntries, RefId * 2); + free(pXlatTables->RefIdToPointer.StateTable); + } + pXlatTables->RefIdToPointer.StateTable = ptrNew; + } +#else pXlatTables->RefIdToPointer.XlatTable = realloc(pXlatTables->RefIdToPointer.XlatTable, sizeof(void *) * RefId * 2); pXlatTables->RefIdToPointer.StateTable = realloc(pXlatTables->RefIdToPointer.StateTable, RefId * 2); +#endif if (!pXlatTables->RefIdToPointer.XlatTable || !pXlatTables->RefIdToPointer.StateTable) { +#ifdef __REACTOS__ + free(pXlatTables->RefIdToPointer.XlatTable); + free(pXlatTables->RefIdToPointer.StateTable); + pXlatTables->RefIdToPointer.XlatTable = NULL; + pXlatTables->RefIdToPointer.StateTable = NULL; +#endif pXlatTables->RefIdToPointer.NumberOfEntries = 0; return; } diff --git a/media/doc/WINESYNC.txt b/media/doc/WINESYNC.txt index dbda7d7e6ae..fe9c49ccc4b 100644 --- a/media/doc/WINESYNC.txt +++ b/media/doc/WINESYNC.txt @@ -173,7 +173,7 @@ dll/win32/regapi # Synced to WineStaging-5.7 dll/win32/resutils # Synced to WineStaging-3.3 dll/win32/riched20 # Synced to Wine-10.0 dll/win32/riched32 # Synced to WineStaging-3.3 -dll/win32/rpcrt4 # Synced to WineStaging-4.18 +dll/win32/rpcrt4 # Synced to Wine-10.0 dll/win32/rsabase # Synced to WineStaging-3.3 dll/win32/rsaenh # Synced to WineStaging-2.9 dll/win32/sccbase # Synced to WineStaging-4.18