WinInet: Fix For Non-Thread-Safe gethostbyname

Robert Shearman rob at
Tue Nov 23 10:32:46 CST 2004


The GetAddress function can sometimes cause an access violation because 
gethostbyname isn't thread-safe. We can work around this by not 
accessing the hostent returned outside of the critical section.


Make GetAddress safer by wrapping a critical section around 
gethostbyname and only accessing hostent where necessary.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: wininet_threadsafefix.diff
Type: text/x-patch
Size: 6663 bytes
Desc: not available
Url :

More information about the wine-patches mailing list