Module: wine Branch: master Commit: 31792f43701d74589e2f06dc5b6446a84d5d4614 URL: https://gitlab.winehq.org/wine/wine/-/commit/31792f43701d74589e2f06dc5b6446a...
Author: Francois Gouget fgouget@codeweavers.com Date: Tue Jan 17 19:39:41 2023 +0100
nsi: Add some margin to the tables size in NsiAllocateAndGetTable().
The table size typically keeps increasing such that in some cases the size we got is already too small by the time we try to get the table content in the next iteration.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=54328
---
dlls/nsi/nsi.c | 1 + 1 file changed, 1 insertion(+)
diff --git a/dlls/nsi/nsi.c b/dlls/nsi/nsi.c index 6d8ae40a5c7..3f324ef555b 100644 --- a/dlls/nsi/nsi.c +++ b/dlls/nsi/nsi.c @@ -71,6 +71,7 @@ DWORD WINAPI NsiAllocateAndGetTable( DWORD unk, const NPI_MODULEID *module, DWOR err = NsiEnumerateObjectsAllParameters( unk, 0, module, table, NULL, 0, NULL, 0, NULL, 0, NULL, 0, &num ); if (err) return err; err = ERROR_OUTOFMEMORY; /* fail if this is the last attempt */ + num += num >> 4; /* the tables may grow before the next iteration; get ahead */ }
if (!err)