https://bugs.winehq.org/show_bug.cgi?id=54328
--- Comment #1 from François Gouget fgouget@codeweavers.com --- The crash comes from two bugs in NsiAllocateAndGetTable() that combine:
1. First the required table size keeps increasing, most likely because there is typically quite a bit of other network traffic while the test is running. So the allocation keeps going like this: num = 64 attempt = 0 NsiEnumerateObjectsAllParameters(..., num = 64) -> too small NsiEnumerateObjectsAllParameters(NULL) returns num=264 attempt = 1 NsiEnumerateObjectsAllParameters(..., num = 264) -> too small NsiEnumerateObjectsAllParameters(NULL) returns num=266 attempt = 2 NsiEnumerateObjectsAllParameters(..., num = 266) -> too small NsiEnumerateObjectsAllParameters(NULL) returns num=267 ...
2. On the last pass through the loop tables are freed and then err is set by:
err = NsiEnumerateObjectsAllParameters( unk, 0, module, table, NULL, 0, NULL, 0, NULL, 0, NULL, 0, &num );
NsiEnumerateObjectsAllParameters() succeeds so NsiAllocateAndGetTable() returns success despite leaving all tables set to NULL, causing get_extended_tcp_table() to crash.
See MR1978: https://gitlab.winehq.org/wine/wine/-/merge_requests/1978