http://bugs.winehq.org/show_bug.cgi?id=28818
Bug #: 28818 Summary: GetNetworkParams occasionally returns ERROR_BUFFER_OVERFLOW (race condition?) Product: Wine Version: 1.3.30 Platform: x86 OS/Version: Mac OS X Status: UNCONFIRMED Severity: normal Priority: P2 Component: -unknown AssignedTo: wine-bugs@winehq.org ReportedBy: cdavis@mymail.mines.edu Classification: Unclassified
A common pattern for functions returning variable-sized data is to call the function twice: once to get the size of the data, and once again to actually get the data. The GetNetworkParams() function in iphlpapi is one such function.
Occasionally on Mac, GetNetworkParams() will return ERROR_BUFFER_OVERFLOW the second time, even with a buffer of the size returned from the first time. My guess is that the size is changing in between calls. I'm not sure if this is a bug or what--can this happen on Windows? Also, is this a Wine bug, or a bug in the Mac version of the BIND9 resolver?
Apple says the BIND9 resolver API is not recommended, and that new programs should use the API in <dns.h> instead. Should Wine be doing this?