[haiku-bugs] Re: [Haiku] #13522: BNetworkAddress::SetTo() doesn't store some error cases.

  • From: "anevilyak" <trac@xxxxxxxxxxxx>
  • Date: Sat, 20 May 2017 02:25:54 -0000

#13522: BNetworkAddress::SetTo() doesn't store some error cases.
--------------------------------+----------------------------
   Reporter:  anevilyak         |      Owner:  pulkomandy
       Type:  bug               |     Status:  assigned
   Priority:  normal            |  Milestone:  Unscheduled
  Component:  Kits/Network Kit  |    Version:  R1/Development
 Resolution:                    |   Keywords:
 Blocked By:                    |   Blocking:
Has a Patch:  0                 |   Platform:  All
--------------------------------+----------------------------
Changes (by anevilyak):

 * owner:  nobody => pulkomandy
 * status:  new => assigned


Old description:

In several of BNetworkAddress's SetTo variants, there are error
conditions that are returned, but not stored on fStatus. Consequently, if
the address was set via the constructor, these errors may go undetected
by subsequent calls to InitCheck().

For instance, at http://cgit.haiku-
os.org/haiku/tree/src/kits/network/libnetapi/NetworkAddress.cpp#n165

If either Resolver.Get() or Resolver->InitCheck() fail, the result is not
stored on fStatus. Similar issues are present in other SetTo variants.

New description:

 In several of BNetworkAddress's SetTo variants, there are error conditions
 that are returned, but not stored on fStatus. Consequently, if the address
 was set via the constructor, these errors may go undetected by subsequent
 calls to InitCheck().

 For instance, at http://cgit.haiku-
 os.org/haiku/tree/src/kits/network/libnetapi/NetworkAddress.cpp#n165

 If either Resolver.Get() or Resolver->InitCheck() fail, the result is not
 stored on fStatus.

 Since the above example is consistent across every SetTo() that requires
 the use of the resolver, I was uncertain if the behavior was deliberate
 for that case, and thought it best to report it.

--

--
Ticket URL: <https://dev.haiku-os.org/ticket/13522#comment:1>
Haiku <https://dev.haiku-os.org>
The Haiku operating system.

Other related posts: