Ethereal-cvs: [Ethereal-cvs] cvs commit: ethereal packet-ssh.c

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: Guy Harris <guy@xxxxxxxxxxxxxxxxxxx>
Date: Thu, 17 Apr 2003 02:39:19 -0500 (CDT)
guy         2003/04/17 02:39:19 CDT

  Modified files:
    .                    packet-ssh.c 
  Log:
  Use "tvb_ensure_length_remaining()" when checking how much data there is
  in the packet when doing reassembly checks, as is done in other places
  where we do TCP segment reassembly.
  
  The return value of "tvb_reported_length_remaining()" can be negative -
  it's a "gint"; assign it to a "gint", so that if we go past the end of
  the packet in the main loop, we break out of that loop (and do so
  elsewhere, just for cleanliness' sake).
  
  Get rid the check in the loop to make sure we make no more than 20
  iterations - all the routines that parse packets should either advance
  the offset by at least one byte or return a "desegmentation required"
  indication; the former means we make progress and eventually exit the
  loop, the latter means we immediately exit the loop.
  
  Use "int" variables, not "guint" variables, for packet offsets.
  
  Revision  Changes    Path
  1.7       +37 -18    ethereal/packet-ssh.c