Wine: gethostbyname implementation in WS2_32 is buggy

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

I am not confident how this patch-submission bussiness
works, so I will just quickly describe what's wrong
and how to fix it.

The current implementation of gethostbyname in WS2_32
(located in winsock/socket.c) doesn't handle a null
string argument correctly.

According to MS definition of gethostbyname, when it
receives a null argument, it should return the same
result as if a call to gethostname was made. Currently
Wine doesn't do this: it simply crashes.

Fix is simple: add something like:
if (name == NULL) return __ws_gethostbyname(
"localhost", WS_DUP_LINEAR );

I hope this helps you out a bit.
Good luck with the project, it's been very useful to me.

__________________________________________________
Yahoo! Plus
For a better Internet experience
http://www.yahoo.co.uk/btoffer


[Index of Archives]     [Gimp for Windows]     [Red Hat]     [Samba]     [Yosemite Camping]     [Graphics Cards]     [Wine Home]

  Powered by Linux