https://bugs.winehq.org/show_bug.cgi?id=54588
Bug ID: 54588 Summary: iphlpapi:iphlpapi - test_GetExtendedTcpTable() sometimes fails because the buffer is too small in Wine Product: Wine Version: unspecified Hardware: x86-64 OS: Linux Status: NEW Severity: normal Priority: P2 Component: iphlpapi Assignee: wine-bugs@winehq.org Reporter: fgouget@codeweavers.com Distribution: ---
iphlpapi:iphlpapi - test_GetExtendedTcpTable() sometimes fails because the buffer is too small in Wine:
iphlpapi.c:1892: Test failed: got 122 iphlpapi.c:1910: Test failed: got 122 iphlpapi.c:1949: Test failed: got 122
See https://test.winehq.org/data/patterns.html#iphlpapi:iphlpapi
This looks like the same issue as with GetAdaptersAddresses(): the number of entries in the table increases between the first call to compute the size and the second call that tries to fill the table. So all uses of GetAdaptersAddresses() should use a loop to defend against this.
nsi:nsi also uses a similar code pattern and although it does not seem to have failures, it should probably be patched too.