kernel32: Fix crash in dns_gethostbyname.

Robert Shearman rob at
Thu Feb 22 08:35:31 CST 2007

If gethostbyname_r can't find the input hostname then it can return a 
NULL host without returning an error (contrary to what the man page says).
Detect this and return an error to the caller so we fall back to the 
name returned by gethostname.
  dlls/kernel32/computername.c |    7 ++++++-
  1 files changed, 6 insertions(+), 1 deletions(-)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: df1e43f731d0b748c4c8fa454ddd4f060a2aad80.diff
Type: text/x-patch
Size: 641 bytes
Desc: not available
Url :

More information about the wine-patches mailing list