[haiku-bugs] Re: [Haiku] #6789: Wrong comparison in tcp add-on

  • From: "stippi" <trac@xxxxxxxxxxxx>
  • Date: Fri, 05 Nov 2010 17:25:43 -0000

#6789: Wrong comparison in tcp add-on
-------------------------------------+------------------------------
  Reporter:  kaliber                 |        Owner:  stippi
      Type:  bug                     |       Status:  in-progress
  Priority:  normal                  |    Milestone:  R1
 Component:  Network & Internet/TCP  |      Version:  R1/Development
Resolution:                          |     Keywords:
Blocked By:                          |  Has a Patch:  1
  Platform:  All                     |     Blocking:
-------------------------------------+------------------------------
Changes (by stippi):

 * owner:  axeld => stippi
 * status:  new => in-progress


Comment:

 I've looked into the problem and your patch is not a good solution. The
 length from the option is used regardless of those comparisions. If size
 happens not to be a multiple of the option length (which may be checked
 elsewhere in the code, I don't know), then the loop will overflow (wrap)
 the size variable. I will commit a different fix.

-- 
Ticket URL: <http://dev.haiku-os.org/ticket/6789#comment:2>
Haiku <http://dev.haiku-os.org>
Haiku - the operating system.

Other related posts: