[haiku-bugs] Re: [Haiku] #12319: Time/NTP sometimes crashes in gethostbyname()

  • From: "axeld" <trac@xxxxxxxxxxxx>
  • Date: Sun, 01 Jan 2017 23:13:09 -0000

#12319: Time/NTP sometimes crashes in gethostbyname()
----------------------------------+----------------------------
   Reporter:  ttcoder             |      Owner:  nobody
       Type:  bug                 |     Status:  new
   Priority:  normal              |  Milestone:  R1
  Component:  Network & Internet  |    Version:  R1/Development
 Resolution:                      |   Keywords:
 Blocked By:                      |   Blocking:
Has a Patch:  0                   |   Platform:  All
----------------------------------+----------------------------

Comment (by axeld):

 If you could actually provide a patch, I'd be happy to apply it :-)

 Two things, though:
 * You should never use `sizeof(address.SockAddr())`, but instead
 `address.Length()`. The former will already return the length of struct
 sockaddr, which might not be adequate for anything but IPv4.
 * There is no need to use an BNetworkAddressResolver; you can just use the
 BNetworkAddress constructor that takes the same arguments directly.

--
Ticket URL: <https://dev.haiku-os.org/ticket/12319#comment:5>
Haiku <https://dev.haiku-os.org>
Haiku - the operating system.

Other related posts: